Advertisement
pan7nikt

kantor

Feb 12th, 2020
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int input;
  5. float pln;
  6. float gbp;
  7. float usd;
  8. float eur;
  9.  
  10.  
  11. main()
  12. {
  13.     cout << "podaj wartosc w PLN: ";
  14.     cin >> pln;
  15.     gbp = pln * 0.20;
  16.     usd = pln * 0.26;
  17.     eur = pln * 0.23;
  18.     cout << "1. na GBP" << endl;
  19.     cout << "2. na EUR" << endl;
  20.     cout << "3. na USD" << endl;
  21.     cout << "podaj, ktora opcje chcesz wybrac: ";
  22.     cin >> input;
  23.     switch(input)
  24.     {
  25.         case 1:
  26.         cout << pln << "PLN to " << gbp << " GBP" << endl; break;
  27.         case 2:
  28.         cout << pln << "PLN to " << eur << " EUR" << endl; break;
  29.         case 3:
  30.         cout << pln << "PLN to " << usd << " USD" << endl; break;
  31.     }
  32.    
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement