Помогите пожалуйста решить все задачи по информатике (9 класс) (задание смотрите во вложении)
Answers & Comments
nikolac1. uses crt; var x,y,z:real; begin read(x,y,z); if (x+y>=0) or (x+z>=0) or (y+z>=0) then writeln('Yes.') else writeln('No.'); end. 2. uses crt; var x,y:integer; begin read(x,y); if (x=0) and (y=0) then writeln('0') else if (y=0) then writeln('1') else if (x=0) then writeln('2') else writeln('3'); end. 3. uses crt; var a,b,c:integer; begin read(a,b,c); if (sqr(a)=sqr(b)+sqr(c)) or (sqr(b)=sqr(a)+sqr(c)) or (sqr(c)=sqr(a)+sqr(b)) then writeln('Yes.') else writeln('No.'); end.
2 votes Thanks 2
sellsaccount
Есть маленькая ошибочка в первой задаче с условием.
sellsaccount1.var a, b, c :integer; begin read(a, b, c); if (a+b>0) or (a+c>0) or (b+c>=0) then writeln('Yes') else writeln('No'); end.
2.var a, b :integer; begin read(a, b); if (a=0) and (b=0) then writeln('0') else if (b=0) then writeln('1') else if (a=0) then writeln('2') else writeln('3'); end.
3.var a,b,c:integer; begin read(a,b,c); if (sqr(a)=sqr(b)+sqr(c)) or (sqr(c)=sqr(a)+sqr(b)) or (sqr(b)=sqr(c)+sqr(b)) then writeln('Yes') else writeln('No'); end.
Answers & Comments
uses crt;
var x,y,z:real;
begin
read(x,y,z);
if (x+y>=0) or (x+z>=0) or (y+z>=0) then
writeln('Yes.')
else
writeln('No.');
end.
2.
uses crt;
var x,y:integer;
begin
read(x,y);
if (x=0) and (y=0) then
writeln('0')
else if (y=0) then
writeln('1')
else if (x=0) then
writeln('2')
else
writeln('3');
end.
3.
uses crt;
var a,b,c:integer;
begin
read(a,b,c);
if (sqr(a)=sqr(b)+sqr(c)) or (sqr(b)=sqr(a)+sqr(c)) or (sqr(c)=sqr(a)+sqr(b)) then
writeln('Yes.')
else
writeln('No.');
end.
begin
read(a, b, c);
if (a+b>0) or (a+c>0) or (b+c>=0) then writeln('Yes')
else writeln('No');
end.
2.var a, b :integer;
begin
read(a, b);
if (a=0) and (b=0) then writeln('0')
else if (b=0) then writeln('1')
else if (a=0) then writeln('2')
else writeln('3');
end.
3.var a,b,c:integer;
begin
read(a,b,c);
if (sqr(a)=sqr(b)+sqr(c)) or
(sqr(c)=sqr(a)+sqr(b)) or
(sqr(b)=sqr(c)+sqr(b)) then writeln('Yes')
else writeln('No');
end.