java例程练习(数三退一[用数组模拟])
摘要:
public class ThreeOut { public static void main(String[] args) { boolean[] arr = new boolean[500]; for(int i = 0; i 1) { if(arr[index] == true) { countNum ++; if(countNum == 3) { countNum = 0; arr[index] = false; leftCount --; } } index ++; if(index == arr.... 阅读全文
posted @ 2012-04-29 16:02
Yours风之恋
阅读(158)
评论(0)
推荐(0)
浙公网安备 33010602011771号