1

Topic: Help to write the code please

To research change of value of the trajectory which are taking off from the tool at an angle  with initial speed V0. Coordinates of points  and at are set by the equations:  = V0 cost; y = V0 sint - gt2/2, where g = 9,8 m/s2 - acceleration of the free falling:
1. At time change t from starting value t0 to finite value tk. With step t;
2. At change of corner  from starting value 0 to finite value k. With step  and at time change t from starting value to finite value with step dt.
In Visual Basic

2

Re: Help to write the code please

the Manual for students and schoolboys

3

Re: Help to write the code please

Private Sub CommandButton1_Click ()
Const pi As Single = 3.1415926
Dim x As Single, y As Single, alpha As Single, v0 As Single
Dim t0 As Single, tk As Single, t As Single, dt As Single
t0 = InputBox ("Enter t0")
tk = InputBox ("Enter tk")
dt = InputBox ("Enter dt")
v0 = InputBox ("Enter v0")
alpha = InputBox ("Enter alpha")
For t = t0 To tk Step dt
y = v0 * Sin (alpha) * t - (g * t ^ 2) / 2
x = v0 * Cos (alpha) * t
Next t
MsgBox "y =" AND Format (y, "0.000") AND "x =" AND Format (x, "0.000")
End Sub

The moderator: we Learn to use tags of design of the code - FAQ
I do not understand as to display the data in the table, like the such
Value X Value Y of Value t (actually they also change, changing thus values X Y) so to say a step
12 15 18
22 1 4

4

Re: Help to write the code please

Looking that is meant under "an output to the screen". It is a lot of methods, for example in MSFlexGrid. All depends on you transited what methods of an output to the screen.

5

Re: Help to write the code please

Shocker. Pro;
Transited print, List1.AddItem (it not especially I understand)
And it would would be desirable that turned out how on a picture

6

Re: Help to write the code please

On a picture idle time .
Collect result in a cycle in a normal text variable, dividing lines vbCrLf, and then put the received result in  (do not forget to include for  )