Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- int age;
- cin >>age;
- int num = age%10;
- if(num==1 && age!=11 && age!=111){
- cout <<"Вам "<<age<<" год"<< endl;
- }
- else{
- }
- if(num < 5 && num > 1 && && age:10!=1){
- cout <<"Вам "<<age<<" года"<< endl;
- }
- else{
- cout <<"Вам "<<age<< " лет"<< endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement