import java.util.Scanner;public class SuiJi {
public static void main(String[] args) {
int time = 1;
int s = (int) (Math.random() * 101);
for (;;) {
System.out.println(s);
Scanner in = new Scanner(System.in);
int a = in.nextInt();

time++;
if (a == s) {
System.out.println("你猜对了!");
} else {
System.out.println("o(∩_∩)o ,猜错了,再来一次!");
}
}

}
}
       随机产生一个100以内的正整数,用户通过键盘输入所猜的数字,如果猜对,则结束程序;如果猜错,则给出提示继续猜,直到猜对为止。使用Scanner类完成。
    我想打印它猜的次数,请问怎么修改呢?^_^!!调了很久,弄糊涂了~~新手询问,谢谢~~o(∩_∩)o ~~