Here’s an example of a C program that calculates the sum of two numbers:
#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.\n”, num1, num2, sum);
return 0;
}
Output;
Enter the first number: 2
Enter the second number: 3
The sum of 2 and 3 is 5.
Thank you❤