0

How would I solve for, if(a = 8 || b==5), where int a =7, b= 1.

So it would look like: Int a=7, b=1; If(a = 8 || b==5) Cout<<a*b; Cout<<" "<<a;

17th Jun 2020, 2:33 AM
Ahmed Sheikh
Ahmed Sheikh - avatar
2 odpowiedzi
0
In this case, nothing will be displayed. Since none of the conditions are met. I suggest you add a logical else statement to output the opposite value.
17th Jun 2020, 7:33 AM
Alexander
Alexander - avatar
0
So this was a question in a c++ challenge and apparently the answer is '1 1'
17th Jun 2020, 5:01 PM
Ahmed Sheikh
Ahmed Sheikh - avatar