Advertisement
Josif_tepe

Untitled

Nov 26th, 2021
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int k;
  8.     cin >> k;
  9.     int prv_test, vtor_test, tret_test, cetvrt_test;
  10.     cin >> prv_test >> vtor_test >> tret_test >> cetvrt_test;
  11.     int zbir = prv_test + vtor_test + tret_test + cetvrt_test;
  12.     int bodova_granica;
  13.     if (k == 2)
  14.     {
  15.         bodova_granica = 60;
  16.     }
  17.     else if (k == 3)
  18.     {
  19.         bodova_granica = 70;
  20.     }
  21.     else if (k == 4)
  22.     {
  23.         bodova_granica = 80;
  24.     }
  25.     else if (k == 5)
  26.     {
  27.         bodova_granica = 90;
  28.     }
  29.     bodova_granica *= 5;
  30.     int petti_test = bodova_granica - zbir;
  31.     if (petti_test > 100)
  32.     {
  33.         cout << "GRESHKA" << endl;
  34.     }
  35.     else {cout << petti_test << endl;}
  36.     return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement