编译错误求助
查看原帖
编译错误求助
1139919
yangqixuan楼主2024/4/29 19:38

在ide上都没问题,交上来编译错误

求助

###以下是代码

#include<iostream>\
#include<cstring>\
using namespace std;\
int many[26];\
int main(){\
	char a[81];\
	for(int i=0;i<4;i++){\
		gets(a);
		int n=strlen(a);
		for(int j=0;j<n;j++)if(a[j]>='A'&&a[j]<='Z')many[a[j]-'A']++;
	}
	int maxx=0;
	for(int i=0;i<26;i++){
		maxx=max(maxx,many[i]);
	}
	for(int i=maxx;i>=1;i--){
		for(int j=0;j<26;j++){
			if(many[j]>=i)cout<<"*";
			else
			cout<<" ";
			if(j!=25)cout<<' ';
		}
		cout<<endl;
	}
	for(int j=0;j<26;j++){
		cout<<char('A'+j);
		if(j!=25)cout<<' ';
	}
}
2024/4/29 19:38
加载中...