|

JavaMatlabPhpHtmlJavaScriptCSSC#Delphi 1


Linux Unix AutoCAD 3D Access Orcad

. , . 5 .

, .
:

Type t=record
Fio:string;
Bal: byte;
End;
Var mas:array [1..n] of t;

: MAS[2].fio With ...do:

With a[i] do
Begin
Write (fio);
Write (bal);
End;

, , , . , .

:
procedure vvod(var xt:tt); forward;
procedure Sred_sum (var st:tt); forward;
procedure Print_best(var pt:tt); forward;
procedure vivod(var vt:tt); forward;

, readln . Sred_sum . 1 . Print_best , . , .

1

2

3

4

program lab;
uses crt,printer;
const n=5;
type
tz=record
NN:byte;
fio:string[40];
all:record
Prof:string[20];
Info:record
day:record
time:array[1..n] of byte;
money:array[1..n] of byte;
end;
end;
info_week:real;
end;
sr_all:real;
sr_one:real;
end;
tt=array [1..n] of tz;
var
t:tt;
procedure vvod(var xt:tt); forward;
procedure Sred_sum(var st:tt); forward;
procedure Print_best(var pt:tt); forward;
procedure vivod(var vt:tt); forward;
procedure vvod;
var
i,j:byte;
begin
textcolor(2);
for i:=1 to n do begin
writeln('vvedite nomer,FIO,profesiu,time,zarplata v day');
with xt[i] do begin
readln(NN);
readln(fio);
readln(all.prof);
for j:=1 to n do begin
readln(all.info.day.time[j]);
readln(all.info.day.money[j]);
end;
end;
end;
end;
procedure Sred_sum;
var
s,s1,sum:real;
i,j,s_money:byte;
begin
s:=0;
for i:=1 to n do begin
s1:=0;
s_money:=0;
for j:=1 to n do begin
sum:=st[i].all.info.day.money[j]/st[i].all.info.day.time[j];
s1:=s1+sum;
s_money:=s_money+st[i].all.info.day.money[j]
end;
st[i].sr_one:=s1/n;
s:=s+st[i].sr_one;
st[i].all.info_week:=s_money;
end;
st[1].sr_all:=s/n;
end;
procedure Print_best;
var
i:byte;
begin
for i:=1 to n do
if pt[1].sr_all<pt[i].sr_one then begin
writeln(pt[i].NN,'.',pt[i].fio,'imeet zarplaty vushe sredney');
end;
end;
procedure vivod;
var
i,j:byte;
begin
textcolor(4);
writeln('--------------------------------------------------------');
writeln('|# | FIO |Vedomoct'' zarplati brigadi za week |');
writeln('| | |-----------------------------------|');
writeln('| | |profesiya| WORK |sr.work|');
writeln('| | | |--------------------------------| |');
writeln('| | | |1day|2day|3day|4day|5 day| |');
writeln('|----------------------------------------------| |');
for i:=1 to n do
with vt[i] do begin
write('|',NN:2,'| ',FIO:13,' |',all.prof:9,'| ');
for j:=1 to n do
with all.info.day do
write(time[j]:2,'|',money[j]:3,'|');
writeln(all.info_week:3:2,' |');
writeln('---------------------------------------------------');
textcolor(4);
end;
end;
{osnovnaya programma}
BEGIN
clrscr;
vvod(t);
Sred_sum(t);
vivod(t);
Print_best(t);
readln;
END.

----------------------------------------------------------------------------------------
|#| FIO | Vedomoct' zarplati brigadi za week |
| | |----------------------------------------------------------------|
| | | profes. | WORK |week.work|
| | | |----------------------------------------| |
| | | | 1 day | 2 day| 3 day| 4 day| 5 day| |
|------------------------------------------------------------------------| |
| 1| Ivanov | elek | 8| 40 | 8| 34 |10| 50| 7| 30| 8 | 46 | 200.00 |
--------------------------------------------------------------------------------------
| 2| Sidorov | progr| 8| 50 | 8| 60 |12|120| 8| 60|14|150| 440.00 |
--------------------------------------------------------------------------------------
| 3| Pomanovskiy| buhgal| 8| 60 | 9| 60 | 7| 45 | 8| 65| 8 |100| 330.00 |
--------------------------------------------------------------------------------------
| 4| Gerasimov | progr| 8|120| 8|150| 8|200| 8|120|12 |250| 840.00 |
--------------------------------------------------------------------------------------
| 5| Repka | work| 8| 40 |12| 60|14| 80| 8| 35 | 8 | 50 | 262.00 |
--------------------------------------------------------------------------------------
4. Gerasimov imeet zarplaty vushe sredney

: 8781





php mysql



C


 


? :

, ? Google !

 
 

© life-prog.ru .