Computer Science Canada Need help with this div and mod stuff |
Author: | foo fighter [ Tue Dec 13, 2005 5:40 pm ] | ||
Post subject: | Need help with this div and mod stuff | ||
Alright well this program is supposed to tell you how many bills and coins you need to make a dollar amount given by the user. Although, it only works with simple inputs like $150 and $200 and it doesn't work for something like $167.89 Could someone fix it for me. ![]()
|
Author: | Geminias [ Tue Dec 13, 2005 9:26 pm ] |
Post subject: | |
that's because the 'div' keyword takes whatever numbers you give it, real , integer, whatever, and it casts them into ints. so just use the '/' operation in your expression. |