write a program to input 2 number using assignment operator
Answers
Answered by
1
#include <stdio.h>
int main() {
int number1, number2, sum;
printf("Enter two integers: ");
scanf("%d %d", &number1, &number2);
// calculating sum
sum = number1 + number2;
printf("%d + %d = %d", number1, number2, sum);
return 0;
}
Result:-Enter two integers: 12
11
12 + 11 = 23
printf("Enter two integers: ");
scanf("%d %d", &number1, &number2);
Result:-sum = number1 + number2;
Answered by
0
int main()
{
int a = 10;
int b = a;
printf("a = %d \t b = %d\n",a,b);
return 0;
}
or
int main (5 6)
Similar questions