+0  
 
+2
685
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?

 Mar 21, 2017
 #1
avatar+1491 
+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. 

 Mar 21, 2017
 #2
avatar+128474 
+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

 Mar 21, 2017

4 Online Users

avatar
avatar