zort56

CALC

Dec 24th, 2016
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int calc;
  8. int cyfra1, cyfra2;
  9. cout << "Podaj pierwsza cyfre: ";
  10. cin >> cyfra1;
  11. cout << "Podaj druga cyfre: ";
  12. cin >> cyfra2;
  13. cout << "Wybierz co chcesz teraz zrobic:\n";
  14. cout << "1 - Dodawanie";
  15. cout << "2 - Odejmowanie";
  16. cout << "3 - Mnozenie";
  17. cout << "4 - Dzielenie";
  18. switch (calc)
  19. {
  20. case 0:
  21. cout << "Dodawanie";
  22. break;
  23. case 1:
  24. cout << "Odejmowanie";
  25. break;
  26. case 2:
  27. cout << "Mnozenie";
  28. break;
  29. case 3:
  30. cout << "Dzielenie";
  31. break;
  32. default:
  33. cout << "Wybierz 1, 2, 3 lub 4!";
  34. break;
  35. }
  36.  
  37. system("pause");
  38. return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment