Created
February 4, 2016 19:23
-
-
Save batmantec/ea5b00180c06988e72ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int sum(int a, int b) | |
{ | |
int c; | |
c=a+b; | |
return c; | |
} | |
int dif (int a, int b) | |
{ | |
int e; | |
e=a-b; | |
return e; | |
} | |
int product (int a, int b) | |
{ | |
int f; | |
f=a*b; | |
return f; | |
} | |
int div (int a, int b) | |
{ | |
int g; | |
g=a/b; | |
return g; | |
} | |
int rem (int a, int b) | |
{ | |
int h; | |
h=a%b; | |
return h; | |
} | |
int main() | |
{ | |
int a,b,d,e,f,g,h; | |
cout<<"Give me the first integer number: "; | |
cin>>a; | |
cout<<"Give me the second integer number: "; | |
cin>>b; | |
d=sum (a,b); | |
e=dif(a,b); | |
f=product (a,b); | |
g=div(a,b); | |
h=rem(a,b); | |
cout<<"------------------------------------------------------"<<endl; | |
cout <<"The sum of the numbers is: "<<d<<endl; | |
cout<<"------------------------------------------------------"<<endl; | |
cout<<"The rest of the numbers is: "<<e<<endl; | |
cout<<"------------------------------------------------------"<<endl; | |
cout<<"The multiplication of the two numbers is: "<<f<<endl; | |
cout<<"------------------------------------------------------"<<endl; | |
cout<<"The division of the two numbers is: "<<g<<endl; | |
cout<<"------------------------------------------------------"<<endl; | |
cout<<"The remainder of the division is: "<<h<<endl; | |
cout<<"------------------------------------------------------"<<endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment