Untitled
unknown
c_cpp
2 years ago
525 B
4
Indexable
#include <iostream>
using namespace std;
void agekoresh(int age) {
setlocale(LC_ALL, "russian");
if (age >= 10 and age <= 19) {
cout << "молод";
}
if (age >= 20 and age <=29) {
cout << "бывалый";
}
if (age >= 30 and age <= 39) {
cout << "старый";
}
if (age >= 40 and age <= 49) {
cout << "таких не бывает";
}
if (age < 10 || age > 40) {
cout << "какой то перец";
}
}
int main()
{
int a;
int b = 0;
cin >> a;
agekoresh(a);
}
Editor is loading...