Problema.
Uses CRT;
Type T=Array[1..50,1..12] Of Integer;
Var A:T; F:Text; N,I,J,Min,L:Integer;
Function FF(I:Integer):Integer;
Var S:Integer;
Begin S:=0;
For J:=1 To 12 Do S:=S+A[I,J];
FF:=S
End;
Begin
Assign(F,'FS.IN'); Reset(F); ReadLn(F,N);
For I:=1 To N Do
For J:=1 To 12 Do Read(F,A[I,J]; Close(F);
Min:=FF(1); L:=1;
For I:=2 To N Do
If Min>FF(I) Then Begin Min:=FF(I); L:=I End;
Assign(F,'FS.OUT'); Rewrite(F);
Write(F,L); Close(F)
End.
Sarcini pentru rezolvare:
1. de repetat comenzile de lucru cu fisiere: Assign, Reset, Rewrite, Read, ReadLn,Write, WriteLn, Close si de descris fiecare comanda.
2. de rezolvat urmatoarea problema:
Niciun comentariu:
Trimiteți un comentariu