#A0discuss. 50%讨论区
50%讨论区
试一下俩代码
#include<bits/stdc++.h>
using namespace std;
int i;
string str[11]={"最多就十个中文字符。","20English.charaters.","你可以在里面说,如","我已签到",".",".",".",".",".",".","."};
int main(){
cin>>i;
cout<<str[i];
}
#include<bits/stdc++.h>
using namespace std;
string stri;
int a;
int main(){
cout<<"你想在“讨论区”里说什么:";
cin>>stri;
system("cls");
cout<<"#include<bits/stdc++.h> \nusing namespace std; \nint i;\nstring str[11]={\"";
for(int i=0;i<stri.size() ;i++){
if('\0'<=stri[i]&&stri[i]<=127){
a++;
}
else{
a+=2;
}
if(a>20){
cout<<"\",\"";
a=0;
}
if(stri[i]=='\"'){
cout<<"\\";
}
cout<<stri[i];
}
cout<<"\"};\nint main(){\n cin>>i;\n cout<<str[i];\n}\"";
}
()
※
#
12345
呵呵