how do I write this in a vb program?



hours = 45.5

payRate = 9.39


hours-(hours-(30*0.061)* payRate = 17.18


that's the answer I need but it keeps calculating it wrong 


is the way it looks to me

hours-(hours-(30*0.061)* payRate 

but it keeps making 


45.5 - (45.5-(30*0.061)* 9.39 = -73.87


I'm lost on this, anyone out there that can lend me a hand?

Guest Mar 21, 2017

The first guest to actually attempt an answer before asking... a godsend!


As for this vb program, l'm at a lost as well. Sorry maybe the math god EP can help out. 

HighSchoolCalculus  Mar 21, 2017

I assume that "vb"  stands for "Visual Basic????"


I think the problem is with your parentheses placement......I think you want


45.5-(45.5-(30*0.061)*9.39)   =


45.5- ( 45.5 - 17.837 )   =






cool cool cool

CPhill  Mar 21, 2017

10 Online Users

New Privacy Policy

We use cookies to personalise content and advertisements and to analyse access to our website. Furthermore, our partners for online advertising receive information about your use of our website.
For more information: our cookie policy and privacy policy.