Answer:
Step-by-step explanation:
data is a statement like
data 10,20, 30 , 40 , 50, 60 , 70, 80
\\the numbers represent ages.
For x := 1 to end of data do a[x]:=read(data)
\\ This is a comment. You could do this much easier if you just use three if statements rather than the if then else.
minor:=0;adult:=0;senior:=0;
while a[x] <> 0 do begin
age:= a[x]
if age < 19 then minor:=minor + 1;
If age > 18 then if age < 65 the adult:=adult + 1;
if age > 64 then senior := senior + 1;
end;
I have not declared the variables anywhere. That depends on what language you are using. The key step you want are the three if statements. How you find out what's in them is another matter.