May 20, 2015

C program to add two num

#include<stdio.h>

int main()
{
   int a, b, c;
   clrscr();

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

   c = a + b;

   printf("sum of entered numbers = %d\n",c);
   getch();
   return 0;
}

OUTPUT:

Enter two number to add
2 4

sum of entered numbers = 6

No comments:

Post a Comment