.98 cents instead of .99
- From: joshdalrymple2000@xxxxxxxxx
- Date: 29 Jan 2006 14:25:29 -0800
double totalCost = 3.91, amountPaid = 4.00;
int totalChange;
totalChange = (int)((amountPaid - totalCost) * 100);
System.out.println(totalChange);
it keeps saying the answer is 8... can any one help?
.
- Follow-Ups:
- Re: .98 cents instead of .99
- From: Googmeister
- Re: .98 cents instead of .99
- From: Stefan Schulz
- Re: .98 cents instead of .99
- Prev by Date: Re: applet talking to server (with ajax?)
- Next by Date: sorry .09 instead of .08
- Previous by thread: applet talking to server (with ajax?)
- Next by thread: Re: .98 cents instead of .99
- Index(es):