Просмотров:
3919
|
Добавил:
ridius
|
Дата:
2014-05-28
|
|
procedure TForm1.N10Click(Sender: TObject); var f:textfile; g,i,x,a,q,w,p,j,u:integer; s:string; begin assignfile(f,'c:\qwerty\qwerty2.txt'); reset(f); readln(f,s); sg1.colCount:=strtoint(s); readln(f,s); sg1.rowcount:=strtoint(s); while not eof(f) do for g:=0 to sg1.ColCount-1 do for i:=0 to sg1.RowCount-1 do begin readln(f,s); sg1.Cells[g,i]:= s; end; a:=0; q:=0; w:=0; p:=0; j:=sg1.ColCount-1; for u:=1 to sg1.RowCount-1 do begin if sg1.Cells[j,u]<>'' then x:=strtoint(sg1.cells[j,u]); if x=5 then a:=a+1; if x=4 then q:=q+1; if x=3 then w:=w+1; if x=2 then p:=p+1; end; l1.caption:=l1.Caption+ 'îòë: '+inttostr(a)+chr(10)+ 'õîð: '+inttostr(q)+chr(10)+ 'óäîâë: '+inttostr(w)+chr(10)+ 'íåóä: '+inttostr(p); end;
Просмотров:
3289
|
Добавил:
ridius
|
Дата:
2010-04-12
|
|
procedure TForm1.N9Click(Sender: TObject); var f:textfile; r,i:integer; s:string; begin assignfile(f,'c:\qwerty\qwerty2.txt'); reset(f); readln(f,s); sg1.colCount:=strtoint(s); readln(f,s); sg1.rowcount:=strtoint(s); while not eof(f) do for r:=0 to sg1.ColCount-1 do for i:=0 to sg1.RowCount-1 do begin readln(f,s); sg1.Cells[r,i]:= s; end; end;
Просмотров:
998
|
Добавил:
ridius
|
Дата:
2010-04-12
|
|
rewrite(f); s:=inttostr(sg1.colcount); writeln(f,s); s:=inttostr(sg1.RowCount); writeln(f,s); for c:=0 to sg1.ColCount-1 do for r:=0 to sg1.RowCount-1 do begin s:=sg1.Cells[c,r]; writeln (f,s); end; closefile(f);
Просмотров:
883
|
Добавил:
ridius
|
Дата:
2010-04-12
|
|
procedure TForm1.N8Click(Sender: TObject); var f:textfile; j,r,x,z,a,i,c:integer; s:string; begin assignfile(f,'c:\qwerty\qwerty2.txt'); reset(f); readln(f,s); sg1.colCount:=strtoint(s); readln(f,s); sg1.rowcount:=strtoint(s); while not eof(f) do for r:=0 to sg1.ColCount-1 do for i:=0 to sg1.RowCount-1 do begin readln(f,s); sg1.Cells[r,i]:= s; end; sg1.ColCount:=sg1.ColCount+1; j:=sg1.colcount-1; sg1.Cells[j,0]:='Èòîã'; z:=0; a:=0; for i:=1 to sg1.rowCount-1 do begin for r:=2 to sg1.ColCount-2 do begin if (sg1.Cells[r,i]<>'í')and (sg1.Cells[r,i]<>' ')and(sg1.Cells[r,i]<>'') then begin x:=strtoint(sg1.cells[r,i]); z:=z+x; a:=a+1; end; end; if a<>0 then sg1.Cells[r,i]:=inttostr(z div a); z:=0; a:=0; end; closefile(f); rewrite(f); s:=inttostr(sg1.colcount); writeln(f,s); s:=inttos
...
Читать дальше »
Категория:
Аниме
|
Просмотров:
810
|
Добавил:
ridius
|
Дата:
2010-04-08
|
| |
Разделы новостей |
Аниме [6] Новости по аниме | Манга [1] Новости по манге | Софт [1] Новости по программному обеспечению. | Хард [1] Новости по техническому обеспечению. | Новости [5] |
|
Календарь новостей |
« Июнь 2025 » | Пн | Вт | Ср | Чт | Пт | Сб | Вс | | | | | | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
|
|