Additon and Multiplication of inserted values

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
<&lt"Enter the value of b: ";

cin>>b;

c=a+b;

d=a*b;

cout
<&lt"a="<&lta<&ltendl<&lt"b="<&ltb<&ltendl<&lt"a+b= "<&ltc<&ltendl;

cout
<&lt"a*b= "<&ltd;

getch();

return 0;

}



OUTPUT


No comments :

Post a Comment