Sunday 17 March 2013

sum of two numbers

#include<stdio.h>
void main()
{
int num1,num2,sum;
printf("Enter two numbers to calculate their sum");
scanf("%d%d",&num1,num2);
sum=num1+num2;
printf("Sum of  %d and %d = %d",num1,num2,sum);
}

No comments:

Post a Comment