实验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");
    }
}

 

转载于:https://www.cnblogs.com/zhuzehua/p/9669854.html

你可能感兴趣的:(实验2-1-7 整数152的各位数字)