Problems with my assignment

Hi everyone! i am trying to create a working currency exchange calculator for my Assignment, all was going well until completion of my program ran into multiple semantic errors however i have no idea where they are or how to fix them.

any help would be greatly appreciated.

my code at the moment:

#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
int main()
{
system("cls");
string currency, currency2, currency3; // currency is DOLLAR currency2 is EURO and currency 3 is POUNDS
char billgates;
int loop = 1;
string choice;
int value;

do{

cout << "please enter either Euro, Pounds or Dollar";
cin >> currency; //user enters either Euro Pounds or Dollar
cout << "please enter either Euro, Pounds or Dollar";
cin >> currency2; //user enters second value
cout << "Please enter the value of the currency you want to exchange";
cin >> value;







if (currency == "Dollar" && currency2 == "Euro")
{
cout << value * 1.13; // the difference between one dollar and one euro is 1.13 on the 13/3/18
cout << "Would you like to perform another conversion ?" << endl;
cin >> choice;
if (choice == "yes") {

}
else if (choice == "no") {

}

}
if (currency == "Dollar" && currency3 == "Pounds") //find out conversion rate //someone help me please i cannot C++ to save my life
{
cout << value * 0.72; // the difference between one dollar and one pound is 0.72 on the 13/3/18
cout << "Would you like to perform another conversion ?" << endl;
cin >> choice;
if (choice == "yes") {

}
else if (choice == "no") {

}

}
else if (currency2 == "Euro" && currency == "Dollar")
{
cout << value * 1.23; //the difference between one Euro and Dollar is 1.23 on the 13/3/18
cout << "Would you like to perform another conversion ?" << endl;
cin >> choice;
if (choice == "yes") {

}
else if (choice == "no") {

}

}
else if (currency2 == "Euro" && currency3 == "Pounds")
{
cout << value * 0.89; // on the 13/03/18 the difference between one euro and one pound is 0.89
cout << "Would you like to perform another conversion ?" << endl;
cin >> choice;
if (choice == "yes") {

}
else if (choice == "no") {

}

}
else if (currency3 == "Pounds" && currency == "Dollar")
{
cout << value * 1.39; // on the 13/3/18 the value of one pound to the dollar was 1.39
cout << "Would you like to perform another conversion ?" << endl;
cin >> choice;
if (choice == "yes") {

}
else if (choice == "no") {

}

}

else if (currency3 == "Pounds" && currency2 == "Euro")
{
cout << value * 1.13; // on the 13/3/18 the value of one pound to one euro is 1.13
cout << "Would you like to perform another conversion ?" << endl;
cin >> choice;
if (choice == "yes") {

}
else if (choice == "no") {

}

}

} while (loop == 1);
return 0;
}
Please use code tags when posting code. While editing your post, highlight the code and click the <> button to the right of the edit window.

Variable billgates is unused.

Rather than repeating the code to ask if you want to perform another conversion, just put the code after the if/then/else ladder.

Add a final "else" part in case the user mistypes a currency name.

Use "choice" directly to end the loop.

Putting this all together:
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
47
48
49
50
51
52
53
54
55
#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
int
main()
{
    system("cls");
    string currency, currency2, currency3;	// currency is DOLLAR currency2 is EURO and currency 3 is POUNDS
    // char billgates;
    int loop = 1;
    string choice;
    int value;

    do {

	cout << "please enter either Euro, Pounds or Dollar";
	cin >> currency;			 //user enters either Euro Pounds or Dollar
	cout << "please enter either Euro, Pounds or Dollar";
	cin >> currency2;			 //user enters second value
	cout << "Please enter the value of the currency you want to exchange";
	cin >> value;

	if (currency == "Dollar" && currency2 == "Euro") {
	    cout << value * 1.13;		 // the difference between one dollar and one euro is 1.13 on the 13/3/18

	}
	if (currency == "Dollar" && currency3 == "Pounds")	//find out conversion rate //someone help me please i cannot C++ to save my life
	{
	    cout << value * 0.72;		 // the difference between one dollar and one pound is 0.72 on the 13/3/18

	} else if (currency2 == "Euro" && currency == "Dollar") {
	    cout << value * 1.23;		 //the difference between one Euro and Dollar is 1.23 on the 13/3/18

	} else if (currency2 == "Euro" && currency3 == "Pounds") {
	    cout << value * 0.89;		 // on the 13/03/18 the difference between one euro and one pound is 0.89

	} else if (currency3 == "Pounds" && currency == "Dollar") {
	    cout << value * 1.39;		 // on the 13/3/18 the value of one pound to the dollar was 1.39

	}

	else if (currency3 == "Pounds" && currency2 == "Euro") {
	    cout << value * 1.13;		 // on the 13/3/18 the value of one pound to one euro is 1.13

	} else {
	    cout << "Can't convert from " << currency << " to " << currency2 << '\n';
	}

	cout << "Would you like to perform another conversion ?" << endl;
	cin >> choice;

    } while (choice == "yes");
    return 0;
}

Thanks for the help mate, i'll keep this in mind for next time. :)
Topic archived. No new replies allowed.