PAT乙级1009 说反话 (20分)

#pragma warning(disable:4996)
#include
#include
#include
using namespace std;

int main()
{
	string temp, str[85];
	temp.resize(80);
	int n = 0;
	while (scanf("%s", &temp[0]) != EOF)
	{
		str[n] = temp;
		n++;
	}
	for (int i = n - 1; i >= 0; i--)
	{
		printf("%s", str[i].c_str());
		if (i != 0)
			printf(" ");
	}
}

你可能感兴趣的:(PAT)