mirror of
https://github.com/svek95/compiler-construction_UIBK-agecontrol.mc.git
synced 2026-05-17 18:41:48 +03:00
8b358ed3fe
add all file for task
31 lines
332 B
Mason
31 lines
332 B
Mason
bool ageforalco(int n)
|
|
{
|
|
if (n < 21) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
|
|
|
|
int main()
|
|
{
|
|
print("Enter you age: ");
|
|
|
|
int age;
|
|
age = read_int();
|
|
print_nl();
|
|
|
|
bool result;
|
|
result = ageforalco(age);
|
|
|
|
if (!result) {
|
|
print("You Can Drink!");
|
|
}
|
|
else {
|
|
print("You Can't drink ):");
|
|
}
|
|
print_nl();
|
|
}
|