if/else statements for school project : <p>I'm just starting to learn C++ for school, and I'm having trouble completing a school project requiring the use of if/else statements. The project requires code that works as:
<a href="https://i.stack.imgur.com/6xOmB.png" rel="nofollow noreferrer">example of working code</a>
My code looks like this:</p>

<pre><code>#include &lt;iostream&gt;

using namespace std;

int ontime;
int zip;
int work;

int main()

{
cout &lt;&lt; "Welcome to the DIG3873 System." &lt;&lt; endl;
cout &lt;&lt; "Did the student submit the exam on time (Y/N)? ";
cin &gt;&gt; ontime;

if (ontime == 'Y' || 'y') {
    cout &lt;&lt; "Did the student zip the file (Y/N)? ";
    cin &gt;&gt; zip;

    if (zip == 'Y' || 'y') {
        cout &lt;&lt; "Did the student's code work as requested (Y/N)? ";
        cin &gt;&gt; work;

        if (work == 'Y' || 'y') {
            cout &lt;&lt; "Congratulations, YOU PASS. "&lt;&lt; endl;
        } else if (work == 'N' || 'n') {
            cout &lt;&lt; "YOU FAIL " &lt;&lt; endl;
        } else {
            cout &lt;&lt; "Please enter a valid response. " &lt;&lt; endl;
        }
    } else if (zip == 'N' || 'n') {
        cout &lt;&lt; "YOU FAIL " &lt;&lt; endl;
    } else {
        cout &lt;&lt; "Please enter a valid response. " &lt;&lt; endl;
    }
} else if (ontime == 'N' || 'n') {
    cout &lt;&lt; "YOU FAIL " &lt;&lt; endl;
} else {
    cout &lt;&lt; "Please enter a valid response. " &lt;&lt; endl;
}
}
</code></pre>

<p>Unfortunately, it's not working as I would have hoped. When it runs, it lets me answer the first statement, then just drops all the other cout statements and a bunch of "YOU FAIL"s and ends the program. We haven't learned anything beyond if/else statements, so I was pretty lost looking at similar coding issues where people recommended using loops instead. Sorry for such a beginner's issue with not understanding if/else statements, thanks!</p>
