Loop Count

 { while (cnt <=11) cnt++;}{
 
 if (cnt <= 3 and cnt > 0) {del = 1500;}

While cnt is less than or equal to 11, uselessly increment it one step at a time. You might as well have:

   cnt = 12;

there.

What do you suppose the if statements will evaluate to?