Question: What's wrong with the following algorithm? The pseudo-code below should calculate and print one divided by a number for all numbers between 1 and
What's wrong with the following algorithm? The pseudo-code below should calculate and print one divided by a number for all numbers between 1 and 1000, inclusive. Give at least three (3) errors by listing the line number where the error occurs and a short description of how to fix the error. Algorithm: Step 1: While (num < 1000 ) Step 2: Step 3: Step 4: Step 5: End loop num= 0 r = 1 / num change num
Step by Step Solution
There are 3 Steps involved in it
Here are three errors in the algorithm along with explanations and fixes 1 Line 1 Missing initia... View full answer
Get step-by-step solutions from verified subject matter experts
