idea中,如何输出100到1
如何只输出偶数
object Test {
def main(args: Array[String]) {
var x = 100;
while(x>=0){
if(x%2==0){
println("x=" + x);
}
x=x-1;
}
}
}