# Einteilung in Altersklassen

## Problembeschreibung

******************************************
Dokumentnummer: D1500
******************************************
Eine Liste mit dem Alter von n Personen ist in Altersklassen
einzuteilen.

## Problemlösung

alter:read("Gib eine Liste mit dem Alter von n Personen ein");

n:length(alter);

jz1:0;
jz2:0;
jz3:0;
jz4:0;
jz5:0;
jz6:0;
jz7:0;
jz8:0;
jz9:0;

for i thru n do if alter[i] <= 10 then jz1:jz1+1;
for i thru n do if alter[i] > 10 and alter[i] <= 20 then jz2:jz2+1;
for i thru n do if alter[i] > 20 and alter[i] <= 30 then jz3:jz3+1;
for i thru n do if alter[i] > 30 and alter[i] <= 40 then jz4:jz4+1;
for i thru n do if alter[i] > 40 and alter[i] <= 50 then jz5:jz5+1;
for i thru n do if alter[i] > 50 and alter[i] <= 60 then jz6:jz6+1;
for i thru n do if alter[i] > 60 and alter[i] <= 70 then jz7:jz7+1;
for i thru n do if alter[i] > 70 and alter[i] <= 80 then jz8:jz8+1;
for i thru n do if alter[i] > 80 and alter[i] <= 90 then jz9:jz9+1;

print("[",jz1,jz2,jz3,jz4,jz5,jz6,jz7,jz8,jz9,"]");