C Program To Add Two Numbers (Integers)



Take two integers from user and add print their sum.



  1. //C Program to add two numbers"
  2. #include<stdio.h>
  3. int main()
  4. {
  5. int a, b, sum;
  6. printf("Enter first number: ");
  7. scanf("%d", &a);
  8. printf("Enter second number: ");
  9. scanf("%d", &b);
  10. sum= (a+b);
  11. printf("Sum = %d", sum);
  12. return 0;
  13. }

Output


Output!