Дамп всех задач
This commit is contained in:
17
Pascal/24.10.16/Program1.pas
Normal file
17
Pascal/24.10.16/Program1.pas
Normal file
@@ -0,0 +1,17 @@
|
||||
var
|
||||
m, n, i, j: integer;
|
||||
|
||||
begin
|
||||
Read(m, n);
|
||||
for j := m to n do
|
||||
begin
|
||||
writeln();
|
||||
write(j, ':= ');
|
||||
for i := 2 to m - 1 do
|
||||
begin
|
||||
if j mod i = 0 then
|
||||
write(i, ' ');
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
25
Pascal/24.10.16/Program2.pas
Normal file
25
Pascal/24.10.16/Program2.pas
Normal file
@@ -0,0 +1,25 @@
|
||||
var
|
||||
a, b, c, n, i,j: int64;
|
||||
gg: boolean;
|
||||
|
||||
begin
|
||||
gg := false;
|
||||
j:=0;
|
||||
read(n);
|
||||
a := 1;
|
||||
b := 1;
|
||||
for i := 1 to ((n*n)-1) do
|
||||
begin
|
||||
c := a + b;
|
||||
a := b;
|
||||
b := c;
|
||||
j:=j+1;
|
||||
if c mod n = 0 then
|
||||
begin
|
||||
gg := true;
|
||||
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
if gg then write('true ',j) else write('false ',j);
|
||||
end.
|
||||
1
Pascal/24.10.16/Program3.pas
Normal file
1
Pascal/24.10.16/Program3.pas
Normal file
@@ -0,0 +1 @@
|
||||
var x, y: real; begin x := -5; while x <= 5 do begin y := 5 - (Sqr(x) / 2); writeln(x, ' ', y); x := x + 0.5; end; end.
|
||||
Reference in New Issue
Block a user