# PIPPIN

who can write a program for the following:

W = X + Y * 3 if x to value of 6 and Y to 9

W = x/4+y * 36y/x x to value of 18 and y to 2

• [b][red]This message was edited by DrMarten at 2006-8-3 12:30:42[/red][/b][hr]

: who can write a program for the following:
:
: W = X + Y * 3 if x to value of 6 and Y to 9
:
: W = x/4+y * 36y/x x to value of 18 and y to 2

_______________________________________________________________________

Hi,

Are you treating these as two separate problems or
simultaneous equations?

VB.Net code>>

[code]
Dim x As Integer
Dim y As Integer
Dim w As Integer

For x=1 To 6
For y=1 to 9

W = X + Y * 3 'Is this the order you want it in?
textbox1.AppendText(" W= " & CStr(w))
textbox1.AppendText(" when x= " & CStr(x))
textbox1.AppendText(" and y= " & CStr(y) & VBCrLf & VBCrLf)

Next
Next
[/code]

Is that what you are after?

For the 2nd equation>>

VB.Net code>>

[code]
Dim x As Double
Dim y As Double
Dim w As Double

For x=1 To 18
For y=1 to 2

W =(x/(4+y)) * ((36*y)/x)) 'Is this the order you want it in?
textbox1.AppendText(" W= " & CStr(w))
textbox1.AppendText(" when x= " & CStr(x))
textbox1.AppendText(" and y= " & CStr(y) & VBCrLf & VBCrLf)

Next
Next
[/code]

Put either section of code in a button click event Sub
and don't forget to add a textbox with MultiLine property
set to True and vertical scrollbar property set.

http://msdn.microsoft.com/vstudio/express/vb/

Regards,

Dr M.

P.S. If PIPPIN is the programming language then i'm sorry i've not
heard of it.