Time Limit: 1 Sec Memory Limit: 16 MB
Submit: 2296 Solved: 1202
[Submit][Status]
给出若干字符串,按倒序输出它们。
输入若干字符串,每个一行,不超过100个,每个串长度不超过100个字符。
按逆序输出这些字符串。
to be or not to be that is a question
that is a question not to be or to be
#include
#include
int
main()
{
char
a[101][101];
int
i=0;
int
x=0;
while
(
gets
(a[x])!=NULL)
{
i++;
x++;
}
int
j;
for
(j=i-1;j>=0;j--)
printf
(
"%s\n"
,a[j]);
return
0;
}