Skip to content

Commit 0b87653

Browse files
committed
Word
1 parent e05d011 commit 0b87653

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

59A.cpp

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include<iostream>
2+
#include<string>
3+
#include<algorithm>
4+
using namespace std;
5+
6+
int main(){
7+
string s;
8+
cin>>s;
9+
int low = 0, up = 0;
10+
for(int i = 0; i < s.size(); i++){
11+
if(s[i] >= 97){
12+
low++;
13+
}
14+
else{
15+
up++;
16+
}
17+
}
18+
if(low >= up){
19+
transform(s.begin() , s.end(), s.begin(), ::tolower);
20+
}
21+
else{
22+
transform(s.begin(), s.end(), s.begin(), ::toupper);
23+
}
24+
cout<<s;
25+
26+
}

0 commit comments

Comments
 (0)