class ShuZhi {
public static void main(String[] args) {
int a = 123;
int b = a%10;
int c = a/10%10;
int d = a/10/10%10;
System.out.println("个位数字是" + b + "十位数字是" + c + "百位数字是" + d );
}
}
12.看程序说结果,请不要提前运行?
public class Test1 {
public static void main(String[] args) {
int x = 4;
int y = (--x)+(x--)+(x*10);
System.out.println("x = " + x + ",y = " + y);
}
}