Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- using namespace std;
- int main()
- {
- int R(0), num(0);
- ifstream ifs("rating.in");
- ifs >> R;
- if (R % 2 == 0)
- {
- num = (R / 2);
- }
- else
- {
- num = (R % 2) + (R / 2);
- }
- ofstream ofs("rating.out");
- ofs << num;
- }
Advertisement
Add Comment
Please, Sign In to add comment