HDU 1321 Reverse Text

链接:http://acm.hdu.edu.cn/showproblem.php?pid=1321

水题....记得要吃换行符

#include<stdio.h>
#include <string.h>
int main()
{
	char data[100];
	int t;
	scanf("%d",&t);
	getchar();
	while(t--)
	{
		gets(data);
	
		for(int i=strlen(data)-1;i>=0;i--)
			putchar(data[i]);
		printf("
");
	}
	return 0;
}


 

原文地址:https://www.cnblogs.com/frankM/p/4399521.html