Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cin >> x;
- cout << "вам " << x << " ";
- if (x % 10 == 1 && x != 11) {
- cout << "год\n";
- }
- else if (x % 10 >= 2 && x % 10 <= 4 && x != 12 && x != 13 && x != 14) {
- cout << "года\n";
- }
- else {
- cout << "лет\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement