You are on page 1of 3

om.

paberAasiqn mend

roq ram qc cale.qore

A P ta accept the aqe of a pers.or and print


Their
their aqe
age Category baselan the belaonkoemakion
L0-9 in fant
3-1 child
13-19 reenaqes
1 -25 youna adult
2-50Aag1t
61-10 Old

ame hourya . Mane


STO 10 SectionD
Sumbilhe to keBan i r
impar Javaukl Scanner

Publicclass 0a
Paublic Ghalic Vaid main (Strinq orgL
Syshem.cut-printlo ("Eaier aqe ")
CanneT Sc DeLo ScanDeT Sustemin

inti in-nexdLot O
in-close O;-
if C=0 2 i = 2)
yshem-OuOrinlo (InPan"
else if Ci>=} 22 ice 12)
Syahemou prinAlo "chil4
else if Ci: 13 A ice 1)
stem 0ut println CTeenager '");
else if G=12 22 14 25)

SdemOut. print In younq adult


elseifCi>:2G 2 i<a 5o)

System.Out print In CAdult)3

else i f C i : 51 22 i<- 110)

ystem.aut println(01a)3
else
SustemOu println C"invalid age enhexed)

End-

You might also like