Question: 5. (a) Rewrite the following program segment using if statements without breaks switch Inum)t case 10: result 0; break; case 20: case 30: result 1;

5. (a) Rewrite the following program segment using if statements without breaks switch Inum)t case 10: result 0; break; case 20: case 30: result 1; break; default: result -2; (b) Rewrite the following program without gotos. This program just finds the first row of an n by n integer matrix x that has nothing but zero values for i 0; ni++) for {j = 0;jsnijt+) 1 2 ll-zero row if (xli0) goto reject; print First all-zero rowis: i break; reject
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
