Asked by drishtee
I need a program to input age of 10 persons and output the oldest and youngest age.
Answers
Answered by
oobleck
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
There are no AI answers yet. The ability to request AI answers is coming soon!
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.