How to get the last 2 digits turned into a decimal
I'm trying to make a program that counts change. So I ask someone how much they paid. If they enter 1234 how can I make it so the last 2 digits are counted as a decimal so it'd be 12.34?
cout << "You gave: $";
cin >> cashGiven;
You can use a string variable for that?
Topic archived. No new replies allowed.