Incompatible types:got Boolean expected LongInt pascalprogrma ex;vara,s,d:integer;beginreadln(a,s,d);if (a+s>d) and (a+d>s) and (s+d>a) thenif a=s=d thenif (a+1=s+1) or (a+1=d+1) or (s+1=d+1) thenwrite('XXXXXX')elsewrite('ssss')else write('sssss') el

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/20 06:25:45
Incompatible types:got Boolean expected LongInt pascalprogrma ex;vara,s,d:integer;beginreadln(a,s,d);if (a+s>d) and (a+d>s) and (s+d>a) thenif a=s=d thenif (a+1=s+1) or (a+1=d+1) or (s+1=d+1) thenwrite('XXXXXX')elsewrite('ssss')else write('sssss') el

Incompatible types:got Boolean expected LongInt pascalprogrma ex;vara,s,d:integer;beginreadln(a,s,d);if (a+s>d) and (a+d>s) and (s+d>a) thenif a=s=d thenif (a+1=s+1) or (a+1=d+1) or (s+1=d+1) thenwrite('XXXXXX')elsewrite('ssss')else write('sssss') el
Incompatible types:got Boolean expected LongInt pascal
progrma ex;
var
a,s,d:integer;
begin
readln(a,s,d);
if (a+s>d) and (a+d>s) and (s+d>a) then
if a=s=d then
if (a+1=s+1) or (a+1=d+1) or (s+1=d+1) then
write('XXXXXX')
else
write('ssss')
else write('sssss')
else
write('ssss');
end.
请问编译器报错:(7,11) Error:Incompatible types:got Boolean expected LongInt
求教正确答案

Incompatible types:got Boolean expected LongInt pascalprogrma ex;vara,s,d:integer;beginreadln(a,s,d);if (a+s>d) and (a+d>s) and (s+d>a) thenif a=s=d thenif (a+1=s+1) or (a+1=d+1) or (s+1=d+1) thenwrite('XXXXXX')elsewrite('ssss')else write('sssss') el
第七行应为 if (a=s) and (a=d) then