Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  practise
Language: PASCAL
Code:
Program askisi11;
uses wincrt;
var
yage,age,i,K1,K2,K3:integer;
yname,name:string;
gender:char;
Begin
K1:=0;
K2:=0;
K3:=0;
i:=0;
yage:=18;
while (i<100) and (age>0) do
Begin
writeln ('Dwse onoma');
readln (name);
writeln ('dwse ilikia');
readln (age);
if age<17 then
Begin
if yage>age then
begin
yage:=age;
yname:=name;
K3:=K3+1
end;
end;
writeln ('dwse filo');
readln (gender);
if gender=M then
K1:=K1+1
else
K2:=K2+1;
end;
i:=i+1;
end;
writeln('Onoma neoterou:', yname);
writeln('Ilikia neoterou:', yage);
writeln ('andres:',K1);
writeln ('ginaikes:',K2);
if K3=0 then
writeln('den iparxoun simmetoxes apo paidia')
else
writeln ('paidia:',K3);
readln;
end.
Comments: