Author:
Evaluation:
Published: 22.03.2017.
Language: Latvian
Level: College/University
Literature: n/a
References: Not used
Time period viewed: 2000 - 2010 years
2011 - 2015 years
  • Samples 'Eksāmens algoritmizācijā', 1.
  • Samples 'Eksāmens algoritmizācijā', 2.
  • Samples 'Eksāmens algoritmizācijā', 3.
  • Samples 'Eksāmens algoritmizācijā', 4.
  • Samples 'Eksāmens algoritmizācijā', 5.
  • Samples 'Eksāmens algoritmizācijā', 6.
Extract

4. Ko izvadīs dotā programma
var i, j, k, m, s :integer;
label CASEPOINT;
begin
k:=17;
m:=k mod 3;
CASEPOINT: case m of
2, 5 : begin m:=m+10; S:=0; goto CASEPOINT end;
1, 10: begin m:=m+15; S:=10; end;
else begin m:=m-2; goto CASEPOINT; end;
end;
writeln( 'm=', m, ' S=', S);
i:=10; S:=0;
for j:=1 to 5 do
begin
if i>5 then i:=i+2 else i:=i+1;
for k:=1 to 5 do
begin
i:=i+3;
S:=S-1;
end;
end;
writeln( 'i=', i, ' S=', S);
end.


m=25 S=10
i=95 S=-25

Author's comment
Atlants