能不能用这种方法
查看原帖
能不能用这种方法
558597
LV06摸鱼楼主2022/1/10 18:20
#include<bits/stdc++.h>
using namespace std;
string a;
bool b;
int main(){
while(1){
a=getchar();
if(a=="{") cout<<"{"<<endl;
else if(a!="}"&& a!=","&& b!=1) {cout<<"  "<<a;b=1;}
else if(a!="}"&& a!=",") cout<<a;
else if(a!="}") {cout<<a<<endl;b=0;}
else {cout<<endl<<"}";break;}
}
}

就是输入一个判断一个,不知道能不能用

2022/1/10 18:20
加载中...