95-1.txt
来自「编译原理课程设计大作业PL0文法简易编译器」· 文本 代码 · 共 20 行
TXT
20 行
const z = 0;kk1=1;
var head,foot,cock,rabbit,n:integer;
begin
n := z;
read(head,foot);
cock := kk1;
repeat
begin
rabbit := head-cock;
if cock*2+rabbit*4 = foot
then begin
write(cock,rabbit);
n := n+1
end;
cock := cock+1
end
until cock > head ;
if n= 0
then write(0,0)
end.