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

 

posted @ 2018-09-18 16:47  博客园机器人  阅读(912)  评论(0编辑  收藏  举报