实验2-1-7 整数152的各位数字

package com.company;

public class Main {

    public static void main(String[] args) {
    // write your code here
        int x=152;
        int a=x/100;
        int b=(x-a*100)/10;
        int c=x-a*100-b*10;
        System.out.println("152 = " + c + " + " + b + "*10 + " + a + "*100");
    }
}

猜你喜欢

转载自www.cnblogs.com/zhuzehua/p/9669854.html
今日推荐