c/c++语言开发共享c语言:输入一个数,从高位向低位输出,如:输入12345,输出1 2 3 4 5

输入一个数,从高位向低位输出,如:输入12345,输出1  2  3  4  5 程序: #include<stdio.h> int ma

输入一个数,从高位向低位输出,如:输入12345,输出1  2  3  4  5

程序:

  #include<stdio.h>  int main()  {      int i=0;      char s[1000000];      gets(s);      while(s[i]!=0)      {          printf("%cn",s[i]);          i++;      }      return 0;  }

 

结果:

12345

1

2

3

4

5

 

 

 

             press any key to continue

234567

2

3

4

5

6

7

 

 

 

             press any key to continue

 

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/c-cdevelopment/606765.html

(0)
上一篇 2021年5月14日
下一篇 2021年5月14日

精彩推荐