Results 1 to 6 of 6
Hybrid View
-
23rd October 2007 16:16 #1_
Join Date: Apr:2006
Location: _
Posts: 1,128
,
.
:
- (3,3)
-
-
-
program demo1;
const
m = 3;
var
flag : boolean;
rez : real;
I, J, k, L : Integer;
type
mat = array[1..m,1..m] of Integer;
A = array[1..m] of real;
begin
for I := 1 to m do
for J := 1 to m do
repeat
write ('Vavedete stoinostta na matritzata [',I,',',J,') = ');
readln (mat [I,J]);
until ((mat[I,J] >= -10000) and (mat[I,J] <= 10000));
writeln;
writeln (' Vavedenite stoinosti na masiva sa: ');
writeln;
----------------------------------------------------------------------------------
.
begin
for I := 1 to m do
begin
for J := 1 to m do
write (mat [I,J]:5);
writeln;
writeln;
end;
begin
for k := 1 to L do
if (k mod 2 = 0) then
for I := 1 to L - 1 do
for J := I+1 to L do
if (A[I] < A[J]) then
begin
flag := false;
rez := a[J];
a[J] := a[I];
a[I] := rez;
end
else
for I := 1 to L - 1 do
for J := I+1 to L do
if (a[I] > a[J]) then
begin
rez := a[J];
a[J] := a[I];
a[I] := rez;
end;
writeln ('Sortiraniqt masiv e:');
writeln;
for I := 1 to m do
write (A[I]:6:1);
readln;
end;
end;
end.
. .
?
. . Pascal.Last edited by Red_Leader; 23rd October 2007 at 18:15.
-
23rd October 2007 18:04 #2Registered User
Join Date: Oct:2003
Location:
Posts: 4,317
, -.
L. , for 1 L, 1 m.
- . , .
, . , - , .
-
23rd October 2007 18:30 #3
, . / , , .
EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|
-
23rd October 2007 19:14 #4_
Join Date: Apr:2006
Location: _
Posts: 1,128
-
23rd October 2007 20:00 #5Registered User
Join Date: Jul:2006
Location:
Posts: 480
-
23rd October 2007 20:25 #6_
Join Date: Apr:2006
Location: _
Posts: 1,128
.txt




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in