
11.03.2009, 17:21
|
|
Постоянный
Регистрация: 15.06.2008
Сообщений: 941
Провел на форуме: 5111568
Репутация:
2399
|
|
через repeat..until:
Код:
program _for;
uses crt;
const a = 2.8;
b = -0.3;
c = 4;
x0 = 0.8;
xE = 2.8;
h = 0.2;
var
x,y:double;
begin
x:=x0;
clrscr;
repeat
if x<1.4 then y:=-1 else
if x=1.4 then y:=0 else
if x>1.4 then y:=1;
writeln('x =',x:3:3,', y =',y:3:3);
x:=x+h;
until x>xE;
readln;
end.
|
|
|