Which two code samples demonstrate valid methods for working with loops?

Which two code samples demonstrate valid methods for working with loops?

Which two code samples demonstrate valid methods for working with loops?

A.
DECLARE I INT DEFAULT 0;
Test_loop: LOOP
SET i =i +1;
IF i> =5 THEN
LEAVE test_loop;
END IF;
END LOOP test_loop;

B.
DECLARE i INT DEFAULT 0;
WHILE I < 5ITERATE
SET i = i +1;
END WHILE;

C.
DECLARE i INT DEFAULT 0;
WHILE i < 5 Do
SET i = i + 1;
END WHILE;

D.
DECLARE i INT DEFAULT 0;
Test _loop; LOOP
SET i =i +1;
IF i >=5 THEN LEAVE;
END IF;
END LOOP test_loop;



Leave a Reply 5

Your email address will not be published. Required fields are marked *


armir01

armir01

A C tested