You are on page 1of 4

Question #1

Source code
#include<iostream.h> void main() {int a,b,c; cout<<"enter the 1st number"<<endl; cin>>a; cout<<"enter the 2nd number"<<endl; cin>>b; c=a+b; cout<<"sum is"<<endl; cout<<c<<endl; }

Screen Shot:

Question #2
Source code
#include<iostream.h> void main() { int a,b,c; cout<<"enter the 1st number"<<endl; cin>>a; cout<<"enter the 2nd number"<<endl; cin>>b; c=a-b; cout<<"differencce is"<<endl; cout<<c<<endl; }

Screen Shot:

Question #3
Source code
#include<iostream.h> void main() { int a,b,c; cout<<"enter the 1st number"<<endl; cin>>a; cout<<"enter the 2nd number"<<endl; cin>>b; c=a*b; cout<<"product is"<<endl; cout<<c; }

Screen Shot:

Question #4
Source code
#include<iostream.h> void main() { int a,b,c; cout<<"enter the 1st number"<<endl; cin>>a; cout<<"enter the 2nd number"<<endl; cin>>b; c=a/b; cout<<"quotient is"<<endl; cout<<c; }

Screen Shot:

You might also like