Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
35
Добавлен:
26.09.2018
Размер:
318 б
Скачать
program test1b;
var
x,i,j:integer;
a,b:boolean;
begin
readln(i,j);
if (i=0) then a:=false;
if (j>0) and (j<=9) then a:=true;
if a then b:=true else b:=false;
if a or b then x:=0;
if not b then
if j mod 2=0 then x:=j div 2
else x:=j;
if i>1 then
begin
i:=i-1; x:=i;
end
else x:=j;
writeln(x);
end.
Соседние файлы в папке Вар_12