Book of tasks on programming. Old version

 

 by Aliaksandr N. Prykhodzka

 

абстрактный, по возрастанию, private, label, format, диаграмма, MYSQL, система счисления, язык программирования, open, символьный, window, window
 

for valuable work you must have JavaScript (allow active content)

Pascal. Pa.26. Nest of tasks. Tasks on substitution

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.1     Answer      Java-analogue      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=___;
    for i:=1 to 3 do Man:=Man+(i*2-1);
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.2     Answer      Java-analogue      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=0;
    for i:=1 to ___ do Man:=Man+(i*3+1);
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.3     Answer      Java-analogue      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=0;
    for i:=___ to 6 do Man:=Man+i;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.4     Answer      Java-analogue      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=0;
    for i:=1 to 2 do Man:=Man+(i*___+1);
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.5     Answer      Java-analogue      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=7;
    for i:=1 to ___ do Man:=Man+(i*2-1);
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.6     Answer

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
type
    FF = (aa, bb, cc, dd, ee);
var
    Man : integer; j, k : FF;
begin
    Man:=1;
    for j:=aa to ___ do
        for k:=aa to ee do Man:=Man+1;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.7     Answer      Java-analogue      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=0;
    for i:=1 to 5 do
        if i mod ___ >0 then Man:=Man+i;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.8     Answer      Java-analogue      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=0;
    for i:=4 to 6 do
        if i mod ___ >0 then Man:=Man+i;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.9     Answer      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=20;    i:=4;
    repeat
        Man:=Man-i; i:=i+1;
    until i=___;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.10     Answer      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=20;    i:=2;
    repeat
        Man:=Man-i; i:=i+1;
    until i=___;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.11     Answer      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=25;    i:=2;
    repeat
        Man:=Man-i; i:=i+1;
    until i=___;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.12     Answer      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=31;    i:=2;
    repeat
        Man:=Man-i;        i:=i+1;
    until i=___;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.13     Answer      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=32;    i:=___;
    repeat
        Man:=Man-i;        i:=i+1:
    until i=7;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.14     Answer      Java-analogue      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=0;
    for i:=1 to ___ do Man:=Man+i;
    Man:=Man-10;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.15     Answer      Java-analogue      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    i:=___;
    if i mod 2=0 then Man:=2
    else
        if i mod 3=0 then Man:=3
        else
            if i mod 5=0 then Man:=5
            else
                if i mod 7=0 then Man:=11
                else Man:=12;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.16     Answer      Java-analogue      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    i:=___;
    if i mod 2>0 then Man:=2
    else
        if i mod 3>0 then Man:=3
        else
            if i mod 5>0 then Man:=5
            else
                if i mod 7>0 then Man:=11
                else Man:=12;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.17     Answer      Java-analogue      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=1;
    for i:=1 to 5 do Man:=Man*i;
    for i:=1 to ___ do Man:=Man-1;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.18     Answer      Java-analogue      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i : integer;
begin
    Man:=0;
    for i:=1 to 5 do Man:=Man+i;
    for i:=1 to ___ do Man:=Man-1;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.19     Answer      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man : integer;
begin
    Man:=0;
    repeat
        Man:=Man+1
    until Man*Man=___;
end.

 

 

Calculator

/ - division

\ - rest

S - sum of numbers from and to

P - multiply numbers from and to

Pa.26.20     Answer      Java-analogue      Visual Basic-analogue

Put values into empty places to force the program produce the number 11 in variable Man


Program AA;
var
    Man, i, j : integer;
begin
    Man:=20;
    for i:=1 to 3 do
        for j:=1 to ___ do Man:=Man-1;
end.

 

©   Aliaksandr Prykhodzka    1993 - 2007