Saturday, September 15, 2012

CODE #03:SAMPLE PROGRAM TO ADD TWO NUMBERS

| |

#include<stdio.h>

main()
{
   int a, b, c;

   printf("Enter two numbers to add\n");
   scanf("%d%d",&a,&b);

   c = a + b;

   printf("Sum of entered numbers = %d\n",c);

   return 0;
}
output :
Enter two numbers to add
4
5
Sum of entered numbers = 9

0 comments:

Post a Comment

Powered by Blogger.