Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     freopen("input.txt", "r", stdin);
  9.     freopen("output.txt", "w", stdout);
  10.     int n, res;
  11.     bool ri = 0;
  12.     cin >> n;
  13.     res = 0;
  14.     for (int i = 1; i <= n; ++i)
  15.         {if (i % 2 == 0)
  16.             ri = 1;
  17.         if (i % 5 == 0)
  18.             {ri = 0;
  19.             ++res;
  20.             }
  21.         }
  22.     cout << res;
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement