Advertisement
Guest User

Untitled

a guest
Oct 24th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. cin >> x;
  2. cout << "вам " << x << " ";
  3. if (x % 10 == 1 && x != 11) {
  4. cout << "год\n";
  5. }
  6. else if (x % 10 >= 2 && x % 10 <= 4 && x != 12 && x != 13 && x != 14) {
  7. cout << "года\n";
  8. }
  9. else {
  10. cout << "лет\n";
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement