Professional Documents
Culture Documents
Question #1: Source Code
Question #1: Source Code
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: