私信TA

用户名:ztl123

访问量:4839

签 名:

等  级
排  名 25054
经  验 553
参赛次数 0
文章发表 12
年  龄 0
在职情况 学生
学  校 江苏科技大学苏州理工学院
专  业

  自我简介:

解题思路:





注意事项:





参考代码:

  1 #include<stdio.h>

  2 int main()

  3 {

  4     int n=0,count=0,i=0;

  5     int a[5]={0};

  6     printf("please input a number(<10000):\n");

  7     scanf("%d",&n);

  8     printf("\n");

  9     while(n!=0)

 10     {

 11         printf("%d",n%10);

 12         a[i++]=n%10;

 13         n/=10;

 14         count++;

 15     }

 16     printf("\n");

 17     for(i=count-1;i>=0;i--)

 18         printf("%d ",a[i]);

 19     printf("\n");

 20     printf("%d\n",count);

 21     return 0;

 22 }

 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区