• Sign Up
• Login
• API
• FAQ
• Tools
• Archive
SHARE
TWEET

# Untitled

a guest Dec 11th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. type
2.   sorevnovanie = record
3.     fam, im: string[20];
4.     nsh: 1..99;
5.     ball: 0..100;
6.   end;
7.   fz = file of sorevnovanie;
8.
9. procedure zadanie_1(var T: text; var f: fz);
10. var
11.   temp: sorevnovanie;
12.   c: char;
13. begin
14.   reset(T);
15.   rewrite(f);
16.   while not eof(T) do
17.   begin
18.     temp.fam := '';
19.         {ΠΏΡΠΎΡΠΈΡΠ°Π²Π°Π΅ΠΌ ΠΏΠΎΡΠΈΠΌΠ²ΠΎΠ»ΡΠ½ΠΎ ΡΠ°ΠΌΠΈΠ»ΠΈΡ ΠΎΡΠ΅ΡΠ΅Π΄Π½ΠΎΠ³ΠΎ ΡΡΠ΅Π½ΠΈΠΊΠ°}
20.     repeat
21.       read(T, c);
22.       temp.fam := temp.fam + c;
23.     until c = ' ';
24.     temp.im := '';
25.         {ΠΏΡΠΎΡΠΈΡΠ°Π²Π°Π΅ΠΌ ΠΏΠΎΡΠΈΠΌΠ²ΠΎΠ»ΡΠ½ΠΎ ΠΈΠΌΡ ΠΎΡΠ΅ΡΠ΅Π΄Π½ΠΎΠ³ΠΎ ΡΡΠ΅Π½ΠΈΠΊΠ°}
26.     repeat
27.       read(T, c);
28.       temp.im := temp.im + c;
29.     until c = ' ';
30.
31.     temp.nsh:=1..99;
32.         {ΡΡΠΈΡΡΠ²Π°Π΅ΠΌ Π½ΠΎΠΌΠ΅Ρ ΡΠΊΠΎΠ»Ρ}
33.     repeat
34.       read(T, c);
35.       temp.nsh :=temp.nsh +c;
36.     until
37.       c='';
38.      temp.ball :=0..100;
39.         {ΡΡΠΈΡΡΠ²Π°Π΅ΠΌ Π±Π°Π»Π»Ρ}
40.     repeat
41.       read(T, c);
42.       temp.ball :=temp.ball +c;
43.     until
44.       c='';
45.   end;
46. end;
47.
48. procedure print_binary_file(var f: fz);
49. var
50.   temp: sorevnovanie;
51. begin
52.   reset(f);
53.   while not eof(f) do
54.   begin
55.     read(f, temp);
56.     write(temp.fam);
57.     for var i := 1 to 21 - length(temp.fam) do
58.       write(' ');
59.     write(temp.im);
60.     for var i := 1 to 21 - length(temp.im) do
61.       write(' ');
62.     writeln(temp.nsh:5, temp.ball:5 );
63.   end
64. end;
65.
66.
67.
68. var
69.   T: text;
70.   f: fz;
71.
72. begin
73.   assign(T, 'G:\26lab.txt'); {ΠΈΡΡΠΎΠ΄Π½ΡΠΉ ΡΠ°ΠΉΠ»}
74.   assign(f, 'lr_26.dat');   {Π±ΠΈΠ½Π°ΡΠ½ΡΠΉ ΡΠ°ΠΉΠ»}
75.   zadanie_1(T, f);
76.   print_binary_file(f);
77.   writeln;
78.
79. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top