Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- #include <iomanip>
- using namespace std;
- void addNumbers()
- {
- int a,b,s;
- cout<<"Prosthesi dyo arithmwn"<<endl<<"Dwste ton prwto arithmo: ";
- cin>>a;
- cout<<endl<<"Dwste ton deutero arithmo: ";
- cin>>b;
- s=a+b;
- cout<<"Athroisma: "<<s;
- }
- void subtractNumbers()
- {
- int a,b,s;
- cout<<"Afairesi dyo arithmwn"<<endl<<"Dwste ton prwto arithmo: ";
- cin>>a;
- cout<<endl<<"Dwste ton deutero arithmo: ";
- cin>>b;
- s=a-b;
- cout<<"Diafora: "<<s;
- }
- void multiplyNumbers()
- {
- int a,b,s;
- cout<<"Pollaplasiasmos dyo arithmwn"<<endl<<"Dwste ton prwto arithmo: ";
- cin>>a;
- cout<<endl<<"Dwste ton deutero arithmo: ";
- cin>>b;
- s=a*b;
- cout<<"Ginomeno: "<<s;
- }
- void devideNumbers()
- {
- float a,b,s;
- cout<<"Diairesi dyo arithmwn"<<endl<<"Dwste ton prwto arithmo: ";
- cin>>a;
- cout<<endl<<"Dwste ton deutero arithmo: ";
- cin>>b;
- s=a/b;
- cout<<"Piliko: "<< fixed << setprecision(2)<<s;
- }
- int main(int argc, char** argv) {
- addNumbers();
- cout<<endl<<endl;
- subtractNumbers();
- cout<<endl<<endl;
- multiplyNumbers();
- cout<<endl<<endl;
- devideNumbers();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement