,  , Delphi

 
 
olfgur
0 / 0 / 0
: 31.10.2011
: 4
1

. .

08.11.2012, 21:51. 261. 0
( )

Z(i,j) , N(l) 1<=l<=i. J.
Delphi
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
program Project2;
 
{$APPTYPE CONSOLE}
 
uses
  SysUtils;
 
function conv(s:string):string;
var
i : integer;
begin
for i:=1 to Length(s)do if (Ord(s[i])<=239)and(Ord(s[i])>=192) then s[i]:=Chr(Ord(s[i])-64)
else if Ord(s[i])>=240 then s[i]:=Chr(Ord(s[i])-16);
conv:=s
end;
 
var
a: array [0..6,0..9] of integer;
b: array of integer;
c: array of real;
n,m,i,j,z,r,t,o,l,kol,min,y:integer;
 
begin
repeat
writeln(conv('Ââåäèòå êîëè÷åñòâî ñòðîê:'));
readln(n);
if (n>6) then
begin
writeln(conv('Êîëè÷åñòâî ñòðîê, ïî óñëîâèþ, *å äîëæ*î ïðåâûø*òü 6'));
end;
if (n<=0) then
begin
writeln(conv('Êîëè÷åñòâî ñòðîê, ïî óñëîâèþ, *å äîëæ*î áûòü ìå*üøå 0'));
end;
until (n>0) and (n<=6);
repeat
writeln(conv('Ââåäèòå êîëè÷åñòâî ñòîëáöîâ:'));
readln(m);
if (m>9) then
begin
writeln(conv('Êîëè÷åñòâî ñòîëáöîâ, ïî óñëîâèþ, *å äîëæ*î ïðåâûø*òü 9'));
end;
if (m<=0) then
begin
writeln(conv('Êîëè÷åñòâî ñòîëáöîâ, ïî óñëîâèþ, *å äîëæ*î áûòü ìå*üøå 0'));
end;
until (m>0) and (m<=9);
writeln;
writeln(conv('Ä*ëåå, ââåäèòå ì*òðèöó ñ '),n,conv(' ñòðîê*ìè(-îé) è '),m,conv(' ñòîëáö*ìè(-îì).'));
writeln;
writeln(conv('Æåë*åòå ëè Âû ç*ïîë*èòü ì*òðèöó âðó÷*óþ?'));
writeln;
writeln(conv('Åñëè Ä*, òî **æìèòå 1, åñëè Íåò, òî **æìèòå 2'));
readln(r);
writeln;
if (r=1) then
begin
writeln(conv('Ïðîèçâîäèòå ââîä.'));
writeln;
for i:=1 to n do
for j:=1 to m do
read(a[i,j]);
writeln;
writeln(conv('Âûâîä ïîëó÷å**îé ì*òðèöû:'));
writeln;
for i:=1 to n do
begin
for j:=1 to m do
begin
write(a[i,j]:3);
end;
writeln;
end;
writeln;
end;
 
if (r=2) then
begin
writeln(conv('Ââåäèòå ÷èñëî, äî êîòîðîãî áóäóò âçÿòû ñëó÷*é*ûå ÷èñë*.'));
readln(t);
randomize;
for i:=1 to n do
begin
for j:=1 to m do
begin
a[i,j]:=random(t);
end;
end;
for i:=1 to n do
begin
for j:=1 to m do
begin
write(a[i,j]:3,' ':3);
end;
writeln;
end;
end;
 
writeln(conv('Îñ*îâ**ÿ öåëü ïðîãð*ììû-âû÷èñëå*èå ìè*èì*ëü*ûõ ýëåìå*òîâ ç*ä***ûõ Â*ìè ñòðîê.'));
writeln;
writeln(conv('Ââåäèòå *îìåð ñòðîêè (îñò**îâê* ýò*ï* ïðè ââîäå *óëÿ!):'));
read(z);
while (z<>0) do
begin
read(i);
 
end.
.
0
Similar
41792 / 34177 / 6122
: 12.04.2006
: 57,940
08.11.2012, 21:51
:

,
procedure TfrmMain.FormActivate(Sender: TObject); var ...

, ,
1) A(N,M) ...

.
! , ...

2n. ,
2n. ...


11 7.

0
MoreAnswers
37091 / 29110 / 5898
: 17.06.2006
: 43,301
08.11.2012, 21:51


1) n- , ...

.
, ! 1) ...

edit
, edit button....




:
1

- , ,
-
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
@Mail.ru