C语言程序设计-利用循环语句编写程序:对一个正整数,将各位数字反序后输出。

急哈!!麻烦快点哈!

第1个回答  推荐于2018-04-11
//---------------------------------------------------------------------------

#include <stdio.h>
#include <string.h>

int main(int argc, char* argv[])
{
char s[80];
int i;
gets(s);
for (i=strlen(s)-1; i>=0; i--) printf("%c",s[i]);

return 0;
}
//---------------------------------------------------------------------------本回答被提问者和网友采纳
相似回答