Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4. int age;
  5. cin >>age;
  6. int num = age%10;
  7. if(num==1 && age!=11 && age!=111){
  8. cout <<"Вам "<<age<<" год"<< endl;
  9. }
  10. else{
  11. }
  12. if(num < 5 && num > 1 && && age:10!=1){
  13. cout <<"Вам "<<age<<" года"<< endl;
  14. }
  15. else{
  16. cout <<"Вам "<<age<< " лет"<< endl;
  17. }
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement