2009-11-17, 01:32 PM
|
Programming help =*(
|
|
2009-11-17, 01:46 PM
taxed is an integer. You try to assign it a double-value. Try taxed = (int) grossPay * 0.15;, or change taxed to a float value/double.
2009-11-17, 01:58 PM
Devil's Sunrise Wrote:taxed is an integer. You try to assign it a double-value. Try taxed = (int) grossPay * 0.15;, or change taxed to a float value/double. tyty =D. I just changed the grossPay , taxed, and net to float rather than int, and i worked just fine. I'm here doin homework for the next 5 hours til class starts so I might have some more questions lol
2009-11-17, 09:50 PM
Offtopic remark (since there's no unanswered question as of now): I like how PHP syntax highlighting actually kind of works on C.
Well I'm in class now so the teacher is answering the stuff that's confusing me, and yah the PHP is very nice
![]() Like we had to write a program that asks a user to input how many miles they drove, and how much gas they used. It would then calculate their MPG. Then it asked them the same question, and the user could repeat it as much as they want. After the user types -1, it calculates their average MPG. It was easy to continually ask for miles travelled, gas used, and spit out an MPG, trying to type code for tallying all the MPGs together and calculating the average was pretty tricky though. Anyone good with RNG programs? I need to write a program that lists a bunch of random numbers between 1 and 50 depending on what number the user inputs. zzzzzzzzzz, I can't figure out how to friggen start the RNG |
|
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)


