Monday 21 May 2012

PROGRAM TO FIND SUM OF TWO NUMBERS


#include<stdio.h>
#include<conio.h>
void main()
{
int a;
int b;
int sum;
clrscr();
printf("\nenter the value for a");
scanf("%d",&a);
printf("\nenter the value for b");
scanf("%d",&b);
sum=a+b;
printf("\nsum of a and b is %d",sum);
}
Output:-
enter the value for a12
enter the value for b14
sum of a and b is 26

No comments:

Post a Comment