Question: A programmer develops the procedure hasElevenEleven ( ) , which should return true if it ever finds a 1 next to a 1 somewhere. For
A programmer develops the procedure hasElevenEleven which should return true if it ever finds a next to a somewhere. For example, hasElevenEleven should return true, but hasElevenEleven should return false.
PROCEDURE hasElevenElevennumbers
i
REPEAT UNTIL i LENGTHnumbers
IF numbersi AND numbersi
RETURN true
i i
RETURN false
The programmer tests it with hasElevenEleven and sees that it does indeed return true.
Can the programmer conclude that the procedure works correctly for all inputs?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
