Да се напише програма, която прочита от файл (създаден с програмата от другата задача) срочната оценка по 6 предмета и:
- ги отпечатва на екрана
- пресмята средния успех за срока и го отпечатва
- извежда броят на предметите, по които има опасност ученика да остане на поправителен
- извежда подходящо съобщение в зависимост от средния успех на ученика
По желание: да се прочитат и имената на предметите и където е удачно, да се отпечатват и те.


Мисля, че не съм направил програмата много прегледна :)
CONST n=6;//Броя на учениците TYPE uchenik=record predmet:string[20]; uspeh:integer; end; VAR f:file of uchenik; uch: array[1..n] of uchenik; i:integer; sbor_ocenki,br_popravitelen:integer; popravitelen: array[1..n] of boolean; uspeh_s_dumi:string; sr_uspeh:real; BEGIN sbor_ocenki:=0; br_popravitelen:=0; assign(f,'info.dat'); reset(f); for i:=1 to n do begin read(f,uch[i]); with uch[i] do begin writeln('Predmet: ',predmet); writeln('Uspeh: ',uspeh); sbor_ocenki:=sbor_ocenki+uspeh;//Намираме сбора на всички оценки if uspeh=2 then begin popravitelen[i]:=true; br_popravitelen:=br_popravitelen+1; end; writeln; end; end; //Пресмятаме средния успех, за да го запишем и с думи sr_uspeh:=sbor_ocenki/n; if (sr_uspeh>=2.00) and (sr_uspeh<2.50) then uspeh_s_dumi:='Slab' else if ((sr_uspeh>=2.50) and (sr_uspeh<3.50)) then uspeh_s_dumi:='Sreden' else if ((sr_uspeh>=3.50) and (sr_uspeh<4.50)) then uspeh_s_dumi:='Dobar' else if ((sr_uspeh>=4.50) and (sr_uspeh<5.50)) then uspeh_s_dumi:='Mnogo Dobar' else if ((sr_uspeh>=5.50) and (sr_uspeh<=6.00)) then uspeh_s_dumi:='Otlichen'; writeln('Sreden uspeh: ', uspeh_s_dumi,' ',sr_uspeh:0:2); if br_popravitelen>0 then begin writeln('Uchenika shte ostava na popravitelen po ', br_popravitelen, ' predmeta:'); for i:=1 to n do with uch[i] do begin if popravitelen[i]=true then writeln(' ',predmet); end; end; close(f); readln; END.Перфектна е :-) Само вместо if popravitelen[i]=true then може да ползваш просто if popravitelen[i] then или да проверяваш дали оценката по предмета е две – нали са в масив.