C program( Write C program to add integers and to display the result.)

 Write C program to add integers and to display the result.

/* To add two integer variables */
 #include<stdio.h>
void main()
{
int num1, num2, sum; 
printf("Enter two integers\n"); 
scanf("%d%d",&num1, &num2); 
sum = num1 + num2;
printf("Sum =%d\n",sum); 

Comments