Question 3: Evaluate the following expressions and find the values X. Explain the order of operations (by precedence rul
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Question 3: Evaluate the following expressions and find the values X. Explain the order of operations (by precedence rul
Question 3: Evaluate the following expressions and find the values X. Explain the order of operations (by precedence rules) with an order of evaluation. x=3*6-3%2+ (12*2-9 %5)*7+3* (8-2*4) + 1 Question 4: Rewrite each of the following codes in another way, as required, to get the same results: if (A==5 ||B=6) //Using if statement but without using logical operator cout<<"AURAK"; if (A==5 && B==6) { cout<<"AURAK"; if(course==1) cout<<"Term 1"; else if (course ==2) cout<<"Term 2"; else if(course =3) cout<<"Summer"; else cout<<"Error"; 1.8 //Using if statement but without using logical operator r //Using switch statement