We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e05d011 commit 0b87653Copy full SHA for 0b87653
59A.cpp
@@ -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
22
+ transform(s.begin(), s.end(), s.begin(), ::toupper);
23
24
+ cout<<s;
25
26
+}
0 commit comments