59A - Word Codeforces || Codeforces 59A - Word Solution
Problem Name: 59A Word
Judge: Codeforces
Problem link:
59A Word
Solution on GitHub: 59A Word
Codeforces 59A - Word Solution in C++/Cpp
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
string s;
cin >> s;
int length = s.length();
int upper = 0, x = length / 2;
for (int i = 0; i < length; i++)
{
if (s[i] >= 'A' && s[i] <= 'Z')
{
upper++;
}
}
if (upper > x)
{
transform(s.begin(), s.end(), s.begin(), ::toupper);
cout << s << "\n";
}
else
{
transform(s.begin(), s.end(), s.begin(), ::tolower);
cout << s << "\n";
}
return 0;
}
Codeforces 59A - Word solution in C C++, 59A codeforces solution in C C++,
Codeforces 59A solution in C C++, 59A - Word Codeforces solution in C C++ Java
Python, C#, Javascript, Codeforces 59A - Word solution in C C++
