C Program to Add Two Numbers - C Program

C Program to Add Two Numbers

#include <stdio.h>
int main()
{
    int firstNumber, secondNumber, sumOfTwoNumbers;
    
    printf("Enter two integers: ");
    scanf("%d %d", &firstNumber, &secondNumber);
    sumOfTwoNumbers = firstNumber + secondNumber;
    printf("%d + %d = %d", firstNumber, secondNumber, sumOfTwoNumbers);
    return 0;
}

Output - C Program to Add Two Numbers

Enter two integers: 12 11
12 + 11 = 23
Compile and Run Online