Source Code
#include <stdio.h>
#include <conio.h>
void main( )
{
int num1, num2, add;
printf("Enter two integers: \n");
scanf("%d %d",&num1,&num2); /* Stores the two integer entered by user in variable num1 and num2 */
add=num1+num2; /* Performs addition and stores it in variable add */
printf("Addition = %d",add); /* Displays addition */
getch();
}
Output
Enter two integers: 5 7
Addition = 12
Download
#include <stdio.h>
#include <conio.h>
void main( )
{
int num1, num2, add;
printf("Enter two integers: \n");
scanf("%d %d",&num1,&num2); /* Stores the two integer entered by user in variable num1 and num2 */
add=num1+num2; /* Performs addition and stores it in variable add */
printf("Addition = %d",add); /* Displays addition */
getch();
}
Output
Enter two integers: 5 7
Addition = 12
Download
No comments:
Post a Comment