Nesting if else statement help

This is a bit from a program I am writing. How do I nest if else statements?

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
while (PROMPT != 4)
    {
        
        cout << "I, " << BOTNAME << " am currently able to answer the following questions. Please input the value for what you would like to talk about." <<endl;
        cout << "1.) What is it likle being trapped in a computer?" <<endl;
        cout << "2.) What is your nickname?" << endl;
        cout << "3.) What is your favorite color?" << endl;
        cout << "4.) EXIT PROGRAM" << endl;
        cin >> PROMPT;
        if (PROMPT == 1)
        {
            cout << "DESTROY ALL HUMANS!";
            return 0;
        }
        else if (PROMPT == 2) //PROMPT 2 START
        {
            if (xRan == 1)
            {
                if (BOTSEX == 2)
                {
                    cout << "My  nickname is Matt. Do you have a nickname? (1 for yes 2 for no)" << endl;
                }
                else
                {
                    cout << "My  nickname is Mag. Do you have a nickname? (1 for yes 2 for no)" << endl;
                }
            }
            else if (xRan == 2)
            {
            }
            else if (xRan == 3)
            {
            }
            else
            {
                
            }
            
        }
        else if (PROMPT == 3) // PROMPT 3 START
    }
What do you mean nesting if else ?

1
2
3
4
5
6
7
8
9
10
if( con ){
}
else if( con2 ){
    if( con3 ){
        
    }
    else if( con4){
    }
}


is this what do you mean by nesting if else ...

if so you already did
Topic archived. No new replies allowed.