convert from: loops properly
convert to: loops back to from (should just loop back to convert to:)
need some guidance
#include<iostream>
using namespace std;
int main()
{
int num;
char ch='y';
int amount;
int choice1,choice2;
while(ch=='y'||ch=='Y')
{
do
{
system("cls");
cout<<"\t\t|DLSL CURRENCY EXCHANGE PROJECT |"<<endl;
cout<<"convert currency from: ";
cin>>choice1;
if(choice1<=15)
{
cout<<"convert currency to: ";
cin>>choice2;
if(choice2<=15)
{
if(choice1==choice2)
{
cout<<"invalid choice"<<endl;
break;
}
else
{
cout<<"Enter amount to be converted: ";
cin>>amount;
cout << amount;
break;
}
}
}
}
while(choice2=true);
cout<<"\nGo to Main Menu Press Y and N for Exit\n";
cin>>ch;
}
}