In this program, the user is asked to enter two integer numbers. Then the addition and multiplication is calculated and displayed on console.
#include<stdio.h>
#include<conio.h>
void main()
{
int n1, n2, add, mul;
clrscr();
printf("Enter the two numbers: ");
scanf("%d %d",&n1, &n2);
add = n1 + n2;
mul = n1 * n2;
printf("a + b = %d", add);
printf("\na * b = %d", mul);
getch();
}
Enter the two numbers: 5 8
a + b = 13
a * b = 40