为什么输出不对???在线等

P1598 垂直柱状图

```cpp #include<bits/stdc++.h> using namespace std; char arr[409]; int tong[26]; int main(){ for(int i=1;i<=4;i++){ cin.getline(arr,400); int len=strlen(arr); for(int j=0;j<len;j++){ if(arr[j]>='A' && arr[j]<='Z'){ tong[arr[j]-'0']++; } } } int t=0; for(int i=0;i<26;i++){ if(t<tong[i]){ t=tong[i]; } } for(int i=t;i>=1;i++){ for(int j=0;j<26;j++){ if(tong[j]>=i){ cout<<"*"<<" "; }else{ cout<<" "<<" "; } } cout<<endl; } for(int i=0;i<26;i++){ printf("%c ",'A'+i); } return 0; } ```
by Asbintle @ 2021-10-25 18:44:13


不是说不要打印多余空格吗
by alvis @ 2021-10-25 19:00:30


@[alvis](/user/195388) 然后呢
by Asbintle @ 2021-10-25 19:02:04


@[alvis](/user/195388) 雀食
by Asbintle @ 2022-07-08 21:42:50


@[alvis](/user/195388) 谢谢
by Asbintle @ 2022-07-08 21:44:00


|