/* Program to find the sum and product of two numbers */
#include<stdio.h>
#include<conio.h>
void main ()
{
int a,b,sum=0, product=0;
clrscr();
printf ("\n Enter the value of a and b ");
scanf ("%d %d",&a,&b);
sum=a+b;
printf ("\n The sum of two numbers is %d",sum);
product=a*b;
printf (" \n The product of two numbers is=%d",product );
getch();
}
Output:
Enter the value of a and b
12
6
The sum of two numbers is 18
The product of two numbers is72
Now the output will be seen as given below:
Nice and simple program
ReplyDelete