标签:load main pre print etc alt for rgba scanf
#include <stdio.h> int main() { char sh[13][6]={"个","十","百","千","万","十万","百万","千万","亿","十亿","百亿","千亿","万亿"}; // int cc=0; // for(cc=0;cc<=13;cc++) // { // printf("%s\n",sh[cc]); // } int bla,sum,shu; scanf("%d",&bla); sum=0; int aa=0; while (bla!=0) { shu=bla%10; bla=bla/10; sum=sum+shu; printf("数字的%4s位数为%5d\n",sh[aa],shu); aa++; } printf("\n%d",sum); getchar(); }
结果:
标签:load main pre print etc alt for rgba scanf
原文地址:https://www.cnblogs.com/xkdn/p/14898105.html