Guest User

Untitled

a guest
Jul 30th, 2016
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <iostream>
  2. #include<cstdlib>
  3.  
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. int nr_unu ;
  10. int nr_doi ;
  11. int semn ;
  12.  
  13. cout << "Introdu un numar" << endl;
  14. cin >> nr_unu;
  15. cout << "Introdu un alt numar" << endl;
  16. cin >> nr_doi;
  17.  
  18. cout << "1.[+]" << endl;
  19. cout << "2.[-]" << endl;
  20. cout << "3.[*]" << endl;
  21. cout << "4.[/]" << endl;
  22.  
  23. cin >> semn ;
  24. if (semn==1){cout << nr_unu+nr_doi ;}
  25. if (semn==2){cout << nr_unu-nr_doi ;}
  26. if (semn==3){cout << nr_unu*nr_doi ;}
  27. if (semn==4){cout << nr_unu/nr_doi ;}
  28.  
  29.  
  30.  
  31. return 0;
  32. }
Add Comment
Please, Sign In to add comment