标签:c语言
#include<stdio.h>
#include<conio.h>
fun(int m,char *s)
{
char c;
int k,i=10;
while(m!=0)
{
k=m%i;
*s=k+‘0‘;
s++;
m=(m-k)/i;
}
*s=‘\0‘;
}
main()
{
int n;
char s[81],*p;
p=s;
printf("enter a number(>100):");
scanf("%d",&n);
fun(n,s);
printf("\nthe result is:\n");
while(*p)
{printf("%c ",*p);
p++;}
printf("\n");}
本文出自 “努力奋斗,互相提高” 博客,请务必保留此出处http://c10086.blog.51cto.com/6433044/1413749
编程题:输入一个数字,实现逆排功能。,布布扣,bubuko.com
标签:c语言
原文地址:http://c10086.blog.51cto.com/6433044/1413749