Question
I need a program to input age of 10 persons and output the oldest and youngest age.
Answers
oldest=0
youngest=999
for i=1..10 }
read age
oldest = age if age > oldest
youngest = age if age < youngest
}
print oldest, youngest
youngest=999
for i=1..10 }
read age
oldest = age if age > oldest
youngest = age if age < youngest
}
print oldest, youngest
Related Questions
The four oldest people in Golden City have lived a total of 384 years put together. The difference i...
Rocks are layered from blank to blank with the blank layers on top, is it youngest, oldest, youngest...
Eva is telling her friend about her siblings. She has one older brother and one younger sister. How...
Eva is telling her friend about her siblings. She has one older brother and one younger sister. How...