Wally
8
Q:

c program to add two numbers

int num1,num2;
printf("%d",num1+num2);
3
#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;
}
0

New to Communities?

Join the community