Advertisement
Josif_tepe

Untitled

Feb 3rd, 2024
712
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int metri;
  6.     cin >> metri;
  7.     metri *= 100;
  8.     int pozicija = 0;
  9.     int cekor = 1;
  10.     int vkupno = 0;
  11.     while(pozicija < metri) {
  12.         if(cekor <= 2) {
  13.         }
  14.         else if(cekor >= 3 and cekor <= 5) {
  15.             pozicija += 50;
  16.         }
  17.         else if(cekor >= 6 and cekor <= 7) {
  18.             pozicija -= 25;
  19.         }
  20.        
  21.         cekor += 1;
  22.         if(cekor > 7) {
  23.             cekor = 1;
  24.         }
  25.         vkupno += 1;
  26.     }
  27.     cout << vkupno << endl;
  28.    
  29.     return 0;
  30. }
  31.  
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement