Question: What will be the output of the algorithm given below? Algorithm: Step 1: Start Step 2: Initialize i = 2, j 3, c, m
What will be the output of the algorithm given below? Algorithm: Step 1: Start Step 2: Initialize i = 2, j 3, c, m = 5 Step 3: Repeat step 4 to step 9 until i < 4 step by 1 Step 4: Compute c = m - 2 Step 5: Repeat step 6 to step 7 until j < m step by 1 Step 6 Check if(j= c) then Step 7 print i 2 End if End Loop Compute m = m% 3 Step 8 Step 9 Print m+j+i End loop: Step 10 Stop
Step by Step Solution
3.34 Rating (160 Votes )
There are 3 Steps involved in it
The given algorithm is not clear and contains some syntax errors However based on the provided steps ... View full answer
Get step-by-step solutions from verified subject matter experts
