Advertisement
Guest User

Untitled

a guest
Jan 26th, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. using namespace std;
  5.  
  6. int A;
  7. int B;
  8. int C;
  9. int main()
  10. {
  11. cout<< "1. Dodawanie" << endl;
  12. cout<<"2. Odejmowanie" << endl;
  13. cout<<"3. Mnozenie" << endl;
  14. cout<<"4. Dzielenie" << endl;
  15. cout<<"Podaj dzialanie (1-4)"<<endl;
  16.  
  17.  
  18. cin >> A;
  19. system( "cls" );
  20. cout<< "Podaj pierwsza liczbe" << endl;
  21. cin >> B;
  22. system( "cls" );
  23. cout<< "Podaj druga liczbe"<< endl;
  24.  
  25. cin >> C;
  26. system( "cls" );
  27.  
  28. {
  29. if (A==1)
  30. cout<< "wynik wynosi: " <<B+C << endl;
  31. }
  32. {
  33. if (A==2)
  34. cout<< "wynik wynosi: " <<B-C << endl;
  35. }
  36. {
  37. if (A==3)
  38. cout<< "wynik wynosi: " <<B*C << endl;
  39. }
  40. {
  41. if (A==4)
  42. cout<< "wynik wynosi: " <<B/C << endl;
  43.  
  44.  
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement