I am trying to write a simple money exchange program. The following should happen: User enters maximum five currency-exchange rate pairs. If they would like to stop entering currencies they may enter x. It calculates the equivalent value. If the user enter -1 it shod stop calculating.
The progream doesn't go for the next loop and when we press character x nothing happens. Can I have some help about it please?
If i understand correctly, your testing if currency equals x, but your if statement is way at the bottom, move it under your getline and it should work. the way you have it now, If the user presses x, it will still execute the rest of your cin inputs before reaching the if statement that tests for x being input.
I made some changes, but the problem is from the second loop it doesn`t let the user enter anything, it just makes some calculations and the result is 0. Can I have some help please?