Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Module Module1
- Sub Main()
- ' Задаём нужные нам переменные
- Dim h, x, y, f0, x1, y1 As Double
- Dim row As Integer
- ' Значения по-умолчанию
- Const x0 = 0
- Const y0 = 1
- Const xk = 1
- Const n = 10
- ' Высчитываем h, x, y, row
- h = (xk - x0) / n
- x = x0
- y = y0
- row = 4
- ' Наш цикл
- While x < xk
- f0 = x * y
- x1 = x + h / 2
- y1 = y + f0 * h / 2
- y = y + x1 * y1 * h
- x = x + h
- row = row + 1
- Console.WriteLine(CStr(row) + " " + CStr(x) + " " + CStr(y))
- End While
- End Sub
- End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement