Advertisement
Josif_tepe

Untitled

Mar 19th, 2021
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     int covecki_godini = 0;
  9.     cin >> n;
  10.     for (int i = 0; i <= n; i += 1)
  11.     {
  12.         if (i == 1)
  13.         {
  14.             covecki_godini += 15;
  15.         }
  16.         if (i == 2)
  17.         {
  18.             covecki_godini += 9;
  19.         }
  20.         if (i >= 3 and i <=6)
  21.         {
  22.             covecki_godini += 4;
  23.         }
  24.         if (i > 6)
  25.         {
  26.             covecki_godini += 5;
  27.         }
  28.     }
  29.     cout << covecki_godini << endl;
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement