![]() |
Problem with simple program to compute change
This program takes a number of pennies and converts it to dollars, quarters, dimes, nickels and pennies, here is the code that I wrote. The problem is, for some reason it always throws in a nickel when it computes the change for any amount that has a penny in it. Any ideas as to why?
example if you give it 346 pennies will return: 3 Dollars 1 Quarter 2 Dimes 1 Nickel <<<there's the problem 1 Penny Code: VB.NET
|
Re: Problem with simple program to compute change
Hi, and Welcome to G4EF ! :)
You have a flaw in the code. You miss a pair of brackets. Look at this line : Code: VB.NET
Code: VB.NET
What you noticed : Quote:
So to correct the problem, just change the above line to : Code: VB.NET
|
| All times are GMT +5.5. The time now is 13:44. |