Taken from your post. Just added casting and another set of parentheses.
int gdpPerCapitaCents = (int)((gdpPerCapita - gdpPerCapitaDollars) * 100); // 75
Remember it does the math in the...
Type: Posts; User: Kewish
Taken from your post. Just added casting and another set of parentheses.
int gdpPerCapitaCents = (int)((gdpPerCapita - gdpPerCapitaDollars) * 100); // 75
Remember it does the math in the...
What is .75 multiplied by 100?
How would you work that into your equation?
If you're getting 0.75 as a double value. What do you need to multiply that by to get 75.0? Then store as an int and you get...?
You're nearly there.