社区讨论
为什么我的不输出?
B3843[GESP202306 三级] 密码合规参与者 1已保存回复 0
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 0 条
- 当前快照
- 1 份
- 快照标识符
- @lszvl1b4
- 此快照首次捕获于
- 2024/02/24 17:25 2 年前
- 此快照最后确认于
- 2024/02/24 20:58 2 年前
蒟蒻求助!代码不输出。感谢万分!
CPP#include <iostream>
#include<string>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
string a;
string b;
int main(int argc, char** argv) {
cin>>a;
int c=0;
int x=0;
int d=0;
int s=0;
for(int i=0;i<=a.length();i++){
if(a[i]!=','){
b[i]=a[i];
}
for(int j=0;j<=b.length();j++){
if(b.length()<=12 && b.length()>=6){
c=1;
if(b[j]<='z' && b[j]>='a'){
x=1;
}
if(b[j]<='Z' && b[j]>='A'){
d=1;
}
if(b[j]<=9 && b[j]>=0){
s=1;
}
}
}
for(int k=0;k<=b.length();k++){
if(c==1){
if((x==1 && d==1) || (x==1 && s==1) || (d==1 && s==1)){
cout<<b<<endl;
}
else{
continue;
}
}
else{
continue;
}
}
}
return 0;
}
回复
共 0 条回复,欢迎继续交流。
正在加载回复...