phantomon

Untitled

Oct 5th, 2011
882
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.34 KB | None | 0 0
  1. class program {
  2.  
  3.     void start(num) {
  4.         moveAndCount(succ(num));
  5.     }
  6.  
  7.     void moveAndCount(num){
  8.         if(frontIsClear){
  9.             move();
  10.             moveAndCount(succ(num));
  11.         }else{
  12.             iterate(num){
  13.                 putbeeper();
  14.             }
  15.         }
  16.     }
  17.  
  18.     program() {
  19.         start();
  20.         turnoff();
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment