Wednesday, October 5, 2016

C Tutorial 4- Add two numbers and take inputs from keyboard


#include<stdio.h>
main()
{
int a,b,sum;
printf("Enter a:" );
scanf("%d",&a);
printf("Enter b:");
scanf("%d",&b);
printf("The sum of %d and %d is = %d \n \n ",a,b,(a+b) );
}
Output

No comments:

Post a Comment