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. }

download android app

Popular C Examples


Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube