摘要: #include#includeusing namespace std;string strReverse(string str1){ int len=str1.size(); string str2=str1; char *end=&str1[0]+len-1; for(int i=0;i=&str1[0]){ str2[i]=end[0]; end--; } return str2;}int main(){ cout>str; string newstr=""; newstr=strR... 阅读全文
posted @ 2013-07-14 19:26 开心成长 阅读(218) 评论(0) 推荐(0) 编辑
摘要: /*PROB:fridayLANG:C++*/#include#includeusing namespace std;const int MAXINPUT=400;const int MONTHS=12;int main(){ int myday[MAXINPUT*MONTHS]; myday[0]=6; int count[7]={0}; int year=1900; int month; int n; ifstream ifs("friday.in"); ofstream ofs("friday.out"); ifs>>n; fo... 阅读全文
posted @ 2013-07-14 11:35 开心成长 阅读(269) 评论(0) 推荐(0) 编辑