Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int nr_unu ;
- int nr_doi ;
- int semn ;
- cout << "Introdu un numar" << endl;
- cin >> nr_unu;
- cout << "Introdu un alt numar" << endl;
- cin >> nr_doi;
- cout << "1.[+]" << endl;
- cout << "2.[-]" << endl;
- cout << "3.[*]" << endl;
- cout << "4.[/]" << endl;
- cin >> semn ;
- if (semn==1){cout << nr_unu+nr_doi ;}
- if (semn==2){cout << nr_unu-nr_doi ;}
- if (semn==3){cout << nr_unu*nr_doi ;}
- if (semn==4){cout << nr_unu/nr_doi ;}
- return 0;
- }
Add Comment
Please, Sign In to add comment