Advertisement
debesciak

3_Zadanie1_6

Oct 21st, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdio>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int a, b, c;
  9.     cout << "Podaj 1 liczbe: " << endl;
  10.     cin >> a;
  11.     cout << "Podaj 2 liczbe: " << endl;
  12.     cin >> b;
  13.     cout << "Podaj 3 liczbe: " << endl;
  14.     cin >> c;
  15.     cout << "Podales: " << a << ", " << b << ", " << c << endl;
  16.     if (a>=b)
  17.     {
  18.         if (a >= c)
  19.         {
  20.             cout << "MAX = " << a << endl;
  21.         }
  22.         else
  23.         {
  24.             cout << "MAX = " << c << endl;
  25.         }
  26.     }
  27.     else
  28.     {
  29.         if (b >= c)
  30.         {
  31.             cout << "MAX = " << b << endl;
  32.         }
  33.     }
  34.     system("pause");
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement