// dunno
program Untitled;
uses CRT, DOS;
var
tablica1,tablica2,tablica3:array[1..10 , 1..10] of integer;
x,y:integer;
begin
writeln('tablica a:');
writeln;
for x:=1 to 10 do
begin
for y:=1 to 10 do
begin
tablica1[x,y]:=x+y;
writeln('x: ',x,' y: ',y);
end;
end;
writeln;
writeln;
writeln('tablica b:');
writeln;
for x:=1 to 10 do
begin
for y:=1 to 10 do
begin
tablica2[x,y]:=x+y;
writeln('x: ',x,' y: ',y);
end;
end;
writeln;
writeln;
writeln('tablica c:');
writeln;
for x:=1 to 10 do
if x mod 2=0 then
begin
for y:=1 to 10 do
begin
tablica1[x,y]:=x+y;
if y mod 2=0 then
writeln('x: ',x,' y: ',y);
end;
end;
readln;
end.
// omg
program Untitled;
uses CRT, DOS;
var
tablica1,tablica2:array[1..10] of integer;
tablica3:array[1..20] of integer;
a,b,x,z,c:integer;
begin
for x:=1 to 10 do
begin
z:=random(100);
tablica1[x]:=z;
writeln(tablica1[x]);
end;
for x:=1 to 10 do
begin
z:=random(100);
tablica2[x]:=z;
writeln(tablica2[x]);
end;
b:=1;
for x:= 1 to 10 do
begin
a:=tablica1[x];
c:=a mod 2;
if c = 0 then
begin
tablica3[b]:=a;
inc(b);
end;
end;
for x:= 1 to 20 do
begin
writeln(tablica3[x]);
end;
readln;
end.
Wyszukiwarka
Podobne podstrony:
15 03 2008Hala Dr Volt 15 03 26 Rzut dachu (1)15 03 ElektronarzedziaLBB9600 15 03 2006 PA PL F2008 Metody obliczeniowe 03 D 2008 10 1 22 5 4715 BIOCHEMIA 2008 Metabolizm weglowodorowid273LBC3483 15 03 2006 PA PL F03 03 2008LBC3011 x1 15 03 2006 PA PL FCW Psychologia Poznawcza 15 03 06LBC3482 15 03 2006 PA PL FLBC3086A 15 03 2006 PA PL FLB1 UW06x x 15 03 2006 PA PL F16 03 2008LBC1227 15 03 2006 PA PL Fwięcej podobnych podstron