Currency Converter

I have to write a program which has the user enter a start value, finish value, and jump value, ex)

user inputs start: 10, finish: 100, jump: 10;
outputs:
10 10*(yen) 10*(british pound) 10*(euro)
20
30
40
...
100

I have a problem correctly outputting the jump value

My program will output:
10
20
....
90

but it will not show the last final digit of 100

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <iostream>
#include <ctime>



using namespace std;

int main()
{
	double dollar, euro, yen, BP;
	double start, finish, jump;
	start = 0;


	euro = 0.78;
	yen = 108.59;
	BP = 0.61;



	cout << "Please enter the start, finish, and jump values for the exchange table:" << endl;
	cin >> start >> finish >> jump;
	cout << "Start: " << start << endl;
	cout << "Finish: " << finish << endl;
	cout << "Jump: " << jump << endl;



	cout << "\t " << char(36) << "\t\t " << char(157) << "\t\t " << char(156) << "\t\t " << char(144) << endl; //Could not find code for Euro symbol!! 
	for (int i = 0; i <=60; i++)
	{
		cout << char(205);
	}
	cout << endl;
	for (int i = start; i <= finish; i += start)
	{

		cout << "\t " << start << "\t\t " << start*yen << "\t\t " << start*BP << "\t\t " << start*euro << endl;
		start += start;
		
	}
	
	system("PAUSE");
	return 0;
}
Not sure.
Is line 35 meant to be for (int i = start; i <= finish; i += jump) ?
Line 39 seems strange ?

ps: Don't worry about euro symbol. It is in the extended ASCII and has different support depending on the character map the console is using making it a tedious chore to support. Better to use the standard expression of: EUR or Euros
Last edited on
Ah that was such a simple semantic error! Thank you!

I got my code to work perfectly, cheers!
Topic archived. No new replies allowed.