ive got this program and its got a error saying
undefined symbol 'true' in function main.
its only one error with the whole program but i dnt know how to fix it
can someone help me fix it.
CODE
#include <iostream.h>
int choice;
double pounds;
double USdollar;
double Euro;
double interest;
int main(){
cout << "Select what you want to convert." <<endl;
cout << "1.Pounds to US dollar." <<endl;
cout << "2.Pounds to Euro." << endl;
cin >> choice;
while (true){
//converts pounds to US dollars
if (choice == 1){
cout << "Please enter amount you want to convert." <<endl;
cin >> pounds;
USdollar = pounds * 0.5; //change the conversion rate
cout << USdollar<< endl;
if (pounds <= 1000){
cout << "Interest rate is 1% of this amount." <<endl;
interest = USdollar + (USdollar * 0.01);
cout << interest << endl;
}
if (pounds > 1000){
cout << "Interest rate is 3% of this amount." <<endl;
interest = USdollar + (USdollar * 0.03);
cout << interest << endl;
}break;
}
//converts pounds to euro
if (choice == 2){
cout << "Please enter amount you want to convert." <<endl;
cin >> pounds;
Euro = pounds * 0.3; //change the conversion rate
cout << Euro<< endl;
if (pounds <= 1000){
cout << "Interest rate is 1% of this amount." <<endl;
interest = Euro + (Euro * 0.01);
cout << interest << endl;
}
if (pounds > 1000){
cout << "Interest rate is 3% of this amount." <<endl;
interest = Euro + (Euro * 0.03);
cout << interest << endl;
}break;
}
if (choice != 1 && choice !=2){
cout <<"Invalid choice. Enter again."<<endl;
}
}return 0;
}
edit: modified title ~ jayman9