oldest=0
youngest=999
for i=1..10 }
read age
oldest = age if age > oldest
youngest = age if age < youngest
}
print oldest, youngest
I need a program to input age of 10 persons and output the oldest and youngest age.
1 answer