Created
September 6, 2012 21:03
-
-
Save vertrigo/3660368 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Program lab2; | |
uses Crt; {подключаем библиотеку} | |
Const xn=0.2; xk=2.2; h=0.2; {объявляем и присваиваем значения константы согласно условию задачи} | |
Var x,y:real; {объявляем переменные x, y с типом real} | |
Begin | |
clrscr; {очищаем экран} | |
y:=0; x:=xn; | |
while x <= xk do {начинаем цикл, пока x не достигнет xk} | |
begin | |
y:= y+2*sqrt(exp(ln(x)*5))*cos(exp(ln(x)*2))/exp(ln(x)*3)+3*exp(ln(x)*2)-x; | |
x:= x+h; | |
end; {конец цикла} | |
writeln('y= ',y:7:4); {вывод результата после окончания цикла} | |
readkey; {программа будет ожидать нажатия любой клавиши для закрытия после выполнения} | |
End. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment