+0  
 
+2
181
2
avatar

how do I write this in a vb program?

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

 

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
Sort: 

2+0 Answers

 #1
avatar+1483 
+1

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
 #2
avatar+79894 
+1

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 )   =

 

17.837

 

 

 

cool cool cool

CPhill  Mar 21, 2017

8 Online Users

avatar
We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.  See details