Program which insert two variables and print their Addition and Multiplication
#include<iostream.h>#include<conio.h>
int main()
{
int a=0,b=0,c=0,d=0;
cout<<"Enter the value of a : ";
cin>>a; //cin>> is used to input data through keyboard by user.
cout<<"Enter the value of b: ";
cin>>b;
c=a+b;
d=a*b;
cout<<"a="<<a<<endl<<"b="<<b<<endl<<"a+b= "<<c<<endl;
cout<<"a*b= "<<d;
getch();
return 0;
}
OUTPUT
No comments :
Post a Comment