Using S-Plus code for(i in 100:1){ if(i>1){ cat(i,"bottles of beer on the wall,",i,"bottles of beer\n") cat("Take one down, pass it around\n") cat(i-1,"bottles of beer on the wall\n",fill=TRUE) } else{ cat(i,"bottle of beer on the wall,",i,"bottle of beer\n") cat("Take one down and pass it around\n") cat("No bottles of beer on the wall!!\n",fill=TRUE) } }