English, asked by Anonymous, 1 month ago

write a program to input 2 number using assignment operator​

Answers

Answered by Anonymous
1

 \bold\red{answer}

#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 mondalranjeet953
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