hi, I'm having trouble getting the output I'm trying to get. i don't know if the issues are in the if statements or how i declared the variables. My code looks like this.
#include <iostream>
#include <iomanip>
using namespace std;
Amount coins input:200 coins
You have input: 0 half-dollars
You have input: 1 quarters
You have input: 0 dimes
You have input: 0 nickels
You have input: 0 pennies
You have input: 0
----------------------------------------------
Amount each coin type
One cent: $0
Nickel: $0
Dime: $0
Quarter: $0.25
Half-Dollar: $0
Others: 0
----------------------------------------------
Subtotal: $0.25
Tax (9.0%): 0.0225
Total: $0.2725
The } at line 93 should be after line 68. This is causing you to exit the for loop on the first iteration. If you used reasonable indentation, this would be obvious.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.