Здесь Вы можете найти ответы на многие вопросы или задать свой вопрос!
var x1,x2,x3,s1,s2,s3: integer;
function sumofnumber(num: integer): integer;
var s: string;
i: integer;
begin
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);
end.
в правильности написания функции типов не уверенна.
program dl9_meru3;
var a,s: real; n,i: integer
writeln ('vvedit a i n(> 0)');
readln (a,n);
s: =0;
a: =a+1;
for i: =2 to n do
s: =s+a;
a: =a*a;
writeln ('suma=',s);
readln
Популярные вопросы