Здесь Вы можете найти ответы на многие вопросы или задать свой вопрос!
я бы сделал
program p_1; var a,b: real; beginwriteln ('vvedite 1-oe'); read (a); writeln ('vvedite 2-oe'); read (b); if (a> b) thenbegin writeln ( ' 1-oe bolshe (',a,')' ); end; if (a< b) thenbegin writeln ( ' 1-oe menshee. bolshe vtoroe (',b,')' ); end; if a=b thenbegin writeln ('oni ravni'); end; end.
var x,s,n: integer;
begin
repeat
read(x);
if x< 0 then n: = n +1;
if x > 0 then s: =s+x;
until x=0;
writeln(n,s);
end.
var x1,x2,x3,s1,s2,s3: integer;
function sumofnumber(num: integer): integer;
var s: string;
i: integer;
s: =str(num);
for i: = 1 to length(s) do
sumofnumber: = sumofnumber+int(s[i]);
end;
read(x1,x2,x3);
s1: =sumofnumber(x1);
s2: =sumofnumber(x2);
s3: =sumofnumber(x3);
if s1> s2 and s1> s3 then writeln(x1);
if s2> s1 and s2> s3 then writeln(x2);
if s3> s2 and s3> s1 then writeln(x3);
в правильности написания функции типов не уверенна.
если не считать пропущенное равно, то нужна разница квадратов в и а
Популярные вопросы