Codeforces 59A
Solution:
- #include <iostream>
- #include<string>
- #include <cstring>
- using namespace std;
- int main() {
- string str ;cin>>str;
- int ln=str.length(); int check=0;
- int small=0,cap=0;
- for(int i=0;i<ln ;i++)
- {
- if(str[i] >= 'A' and str[i]<='Z')
- cap++;
- else small++;
- }
- if (cap > small)
- for(int i=0;i<ln ;i++)
- str[i]= toupper(str[i]);
- else
- for(int i=0;i<ln ;i++)
- str[i]=tolower(str[i]);
- cout<<str<< endl;
- return 0;
- }
Comments
Post a Comment