#include <stdio.h> int main(){ int num; int m=1; int i; int v; int count=1; if (scanf("%d",&num)!=0){ while (num/m>9){m*=10;count++;} //printf("%d %d\n",num,m); for (i=0;i<count;i++){ //printf("%d %d\n",num,m); v = num/m; num = num%m; m = m/10; printf("%d ",v); } }else{ printf("输入信息存在错误"); } return 0; }
c语言编程练习题:7-37 输出整数各位数字
作者:yunjinqi
类别:编程
日期:2023-05-29 14:10:41
阅读:595 次
消耗积分:0 分
版权所有,转载本站文章请注明出处:云子量化, https://www.yunjinqi.top/article/162
最新文章
系统当前共有 442 篇文章