Basically, I would like to make it so that once you make it to the end of the part containing string AccountType, you can hit the enter key and it essentially
just clears the current page and displays the next part of the program with string CompanyName. Is it an easy addition?
#include <iostream>
#include <string>
#include <cstdio>
#include <cstdlib>
usingnamespace std;
int main()
{
string AccountType;
cout<<"Enter 'Checking'to open a checking, and ";
cout<<"'Savings' to open a ";
cout<<"savings account."<<endl<<endl;
cin>>AccountType;
if (AccountType == "Checking" || AccountType == "checking") {
cout<<"You have chosen to open a checking account."<<endl<<endl;
}
elseif (AccountType == "Savings" || AccountType == "savings") {
cout<<"You have chosen to open a savings account."<<endl<<endl;
}
else {
cout<<"unrecognized command"<<endl<<endl<<endl;
cout<<main();
}
string CompanyName;
cout<<"Axiom reccomends that you choose: "<<endl;
cout<<" -Ally Bank"<<endl;
cout<<" -5th 3rd Bank"<<endl;
cout<<" -PNC Bank"<<endl;
cout<<" -Bank of America"<<endl<<endl;
cout<<"Please enter the name of "
<<" the company you wish to use: "<<endl<<endl;
cin>>CompanyName;
if (CompanyName == "Ally" || CompanyName == "ally") {
cout<<"Congratulations, you have chosen Ally bank."<<endl;
}
elseif (CompanyName == "PNC" || CompanyName == "pnc") {
cout<<"Congratulations, you have chosen PNC."<<endl;
}
elseif (CompanyName == "5th 3rd" || CompanyName == "Fifth Third") {
cout<<"Congratulations, you have chosen 5th 3rd bank."<<endl;
}
elseif (CompanyName == "Bank of America" || CompanyName == "bank of america") {
cout<<"Congratulations, you have chosen Bank of America."<<endl;
}
return 0;
}