Answered step by step
Verified Expert Solution
Question
1 Approved Answer
NEED HELP WITH 3 a. and b. 3. C selection statements a. In the following code, C would check the condition of each if statement
NEED HELP WITH 3 a. and b.
3. C selection statements a. In the following code, C would check the condition of each if statement even if only one if statement condition is true. In addition, three if statement conditions (ii, iii, v) could be true, such as when inlbs has the value 80 so that digout is set to a value thrice. The if statement condition at v is incorrect since digout should have the value 1011 if inlbs is lower than 60. Rewrite the code as one nested if/else construct similar to the code on slide 16 of chapter 4 so that can evaluate the if statement more efficiently and correctly. Presume that equality should only be checked with inlbs >= ? rather than inlbs = 90) digout = 1111; ii. if (inlbs >- 80 && inlbs = 70 && inlbs = 60 && inlbsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started