Note, this is psudocode, because i dont know what language you are coding in.
define a variable: minors
define a variable: adults
define a variable: seniors
define a variable: age
if age <18{
add one to minors
}
else if 18<age<64{
add one to adults
}
else if age >= 65{
add one to seniors
}