作者jasonfghx (工人)
看板NTUBIME102HW
标题[C++ ] 上机3
时间Tue Dec 1 17:55:39 2009
#include<iostream>//header file
#include<iomanip>
#include<cmath>
using namespace std;
using std::setw;
using std::fixed;
using std::setprecision;
#include<string>
using std::string;
using std::getline;
int main()
{
string set;
int a;
char c;
cout<<"enter ^z to exit"<<endl;
while((c=cin.get())!=EOF)
{
getline(cin,set);
a=set.size();
for(int i=a-1;i>=0;i--)
{
cout<<set[i];
}
cout << c;
cout<<endl;
}
system("pause");
return 0;
}
考古题答案跑不出
给各位参考
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.7.59