VAR
x, y, xmin, xmax, dx : Real;
BEGIN
Writeln('Табулирование функции.');
xmin := -3; xmax := 2; dx := 0.5; x := xmin;
WHILE x<=xmax DO
begin
y := abs(2-sqr(x))+1;
Writeln(x:6:3, y:6:3);
x := x+dx;
end {while};
Readln
END.
<span>program name;
var i,n,x,summa,count:integer;
nechet:boolean;
begin
Writeln('Vvedite n: ');
readln(n);//получаем n
summa:=0;
count:=0;
i:=1;
if(n mod 2 = 1) then nechet := true else nechet := false; //проверяем четное число или нет
while i<n do begin//пока число меньше n
if(nechet) then//если число нечентное
begin
summa:=summa+i*i*i;//прибавляем к сумме куб этого числа
end
else//если число четное
begin
summa:=summa+i*i;//прибавляем квадрат числа
end;
i:=i+1;//прибавляем число на 1
end;
writeln(' summa: ', summa);//выводим сумму
readln();
end.</span>
Var a, b: integer;
begin
readln(a);
if (a = 1) then write('Здравствуйте, Уважаемая ');
if (a = 2) then write('Здравствуйте, Уважаемый ');
if ((b > 25) and (a = 1)) then writeln('мадама');
if ((b <= 25) and (a = 1)) then writeln('леди');
if ((b > 25) and (a = 2)) then writeln('сэр');
if ((b <= 25) and (a = 2)) then writeln('господин');
end.
Слова только поменяйте, что ли...:)
Ответ:
1)
Begin
Count:=0;
repeat
Read (ch);
If ch> 0 then inc(count);
Until ch<>0
Write(count);
End.
2)
Begin
Sum:=0;
Count:=0;
repeat
Read (ch);
Sum:=sum+ch;
If ch mod 9=0 then inc(count);
Until sum<200
Write(count);
End.
Uses crt;var i,n,s:integer;beginn:=0;writeln('vvedite chislo');readln(s);for i := 1 to s don:=n+i;writeln(n);readln;end.