c语言编程练习题:7-75 整数152的各位数字
作者:yunjinqi   类别:    日期:2023-05-30 15:55:56    阅读:114 次   消耗积分:0 分    

image.png

#include <stdio.h>
int main(){
    int n =152;
    int a,b,c;
    c = n/100;
    b = (n-100*c)/10;
    a = (n-100*c-10*b);
    printf("%d = %d + %d*10 + %d*100",n,a,b,c);
    return 0;
}


版权所有,转载本站文章请注明出处:云子量化, http://www.woniunote.com/article/200
上一篇:c语言编程练习题:7-74 三角形判断
下一篇:c语言编程练习题:7-76 计算分段函数[3]