Call us at 0700-922-6559 or Click here

Write a program to accept the values of two variables.

#include <stdio.h>

int main() {

   int n1;

   int n2;

   printf(“Enter the number 1:\n”);

   scanf(“%d”, &n1);

   printf(“Enter the number 2:\n”);

   scanf(“%d”, &n2);   

   printf(“Number 1: %d\n”, n1);

   printf(“Number 2: %d\n”, n2);   

   return 0;



Enter the number 1:


Enter the number 2:


Number 1: 56

Number 2: 67

Leave a Reply

Your email address will not be published. Required fields are marked *