Facebook
From Gamboge Elephant, 6 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 292
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5.  
  6. {
  7.  
  8.         cout << "1.dodawanie" << endl;
  9.         cout << "2.odejmowanie" << endl;
  10.         cout << "3.dzielenie" << endl;
  11.         cout << "4. reszta z dzielenia" << endl;
  12.         cout << "5.zamkniecie programu" << endl;
  13.  
  14.         int a,b,c;
  15.         cin >> a;
  16.         if (a == 1)
  17.  
  18.         {
  19.                 cin >> b;
  20.                 cin >> c;
  21.                 cout << b + c << endl;
  22.                 cout << b - c << endl;
  23.                 if (c != 0)
  24.                         cout << b / c;
  25.         }
  26.  
  27.         if (a == 2) {
  28.                 cin >> b;
  29.                 cin >> c;
  30.                 cout << b / c;
  31.  
  32.  
  33.  
  34.         }
  35.         if (a==4)
  36.         {
  37.                 cin >> b;
  38.                 cin >> c;
  39.                 cout << b%c;
  40.         }
  41.         if (a = 0)
  42.         {
  43.                 return 0;
  44.         }
  45.         system("PAUSE");
  46.         return 0;
  47. }
  48.  
  49.