Из данного списка спортсменов распечатать сведения о тех из них, кто занимается плаванием. Указать возраст, сколько лет они занимаются спортом — Pascal(Паскаль)

Program sportmans;
uses crt;
Type Sport=Record Family, discipline:string[20];
                  vozrast,letVsporte:integer;
     end;
var A:array [1..3] of sport;
 
    i,n,s:integer;
 
Begin Write ('Vvedite koli4estvo sportsmenov');
      Read (n);
      For i:=1 to n do
      Begin Writeln ('Vvedite dannie sportsmena');
            With A[i] do
                          begin
                                writeln ('Vvedite vozrast sportsmena');
                                readln (vozrast);
                                writeln ('Vvedite disciplinu');
                                readln (discipline);
                                writeln ('Vvedite koli4estvo let v sporte');
                                Readln (letVsporte);
                                Writeln ('Vvedite Family');
                                Readln (Family);
                                end;
                                end;
 
S:=0;
For i:=1 to n do
With a[i] do
If discipline = 'plavanie'
   then S:=S+1;
   Writeln (S);
 
End.

Leave a Comment

31 − = 22