Question: I cant figure this on C + + Given two integers N 1 and N 2 , write a program to display a number based

I cant figure this on C++Given two integers N1 and N2, write a program to display a number based on following conditions:
0 if N1 is 5 and N2 is 2.
1 if N1 is 5 and N2 is not 2.
2 if N1 is not 5 and N2 is 2.
3 if N1 is not 5 and N2 is not 2.
Use nested-if-else statement.
Example Input
5
4
Output
1
Here, N1=5 and N2!=2. Hence, the result is 1 according to the given conditions.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!