Question: Identify four errors in this algorithm. 01 NumberProducts 50 // length of array Product Name [] 02 OUTPUT Please enter product to find 03

Identify four errors in this algorithm.

01 NumberProducts 50 // length of array Product Name [] 02 OUTPUT

01 NumberProducts 50 // length of array Product Name [] 02 OUTPUT "Please enter product to find " 03 INPUT Product 04 Found FALSE - 05 Counter 1 06 REPEAT + 07 IF Product = Product Name [Counter] 08 09 THEN Found FALSE 10 ELSE 11 Counter Counter - 1 12 ENDIF 13 UNTIL Found AND Counter > NumberProducts 14 IF Found 15 16 17 18 THEN OUTPUT Product, "found at position ", Counter, "in the list." ELSE OUTPUT Name, "not found." 19 ENDIF

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Cambridge International AS & A Level Computer Science Questions!