The Program in C to input two numbers from the keyboard and Print their Sum given below:
#include <stdio.h>
int main() {
int num1, num2, sum;
printf("Enter the first number: ");
scanf("%d", &num1);
printf("Enter the second number: ");
scanf("%d", &num2);
sum = num1 + num2;
printf("The sum of %d and %d is %d", num1, num2, sum);
return 0;
}
Outputs:
Enter the first number: 990
Enter the second number: 198
The sum of 990 and 198 is 1188
Learn C-Sharp ↗
C-sharp covers every topic to learn about C-Sharp thoroughly.
Learn C Programming ↗
C-Programming covers every topic to learn about C-Sharp thoroughly.
Learn C++ Programming↗
C++ covers every topic to learn about C-Sharp thoroughly.