Opening a new screen

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?

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
56
57
58
59
60
61
62
  #include <iostream>
#include <string>
#include <cstdio>
#include <cstdlib>

using namespace 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;
}

else if (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;
    }

    else if (CompanyName == "PNC" || CompanyName == "pnc") {
        cout<<"Congratulations, you have chosen PNC."<<endl;
    }

        else if (CompanyName == "5th 3rd" || CompanyName == "Fifth Third") {
            cout<<"Congratulations, you have chosen 5th 3rd bank."<<endl;
        }
else if (CompanyName == "Bank of America" || CompanyName == "bank of america") {
    cout<<"Congratulations, you have chosen Bank of America."<<endl;
}



   return 0;
}
Topic archived. No new replies allowed.