initial commit
This commit is contained in:
parent
62cbb4139e
commit
0338163309
30
59A Word/59A.cpp
Normal file
30
59A Word/59A.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
#include<bits/stdc++.h>
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
int i,len,uppercase=0,lowercase=0;
|
||||
char s[100];
|
||||
cin>>s;
|
||||
len=strlen(s);
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
if(islower(s[i])) lowercase++;
|
||||
else uppercase++;
|
||||
}
|
||||
if(lowercase<uppercase)
|
||||
{
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
s[i]=toupper(s[i]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(i=0;i<len;i++)
|
||||
{
|
||||
s[i]=tolower(s[i]);
|
||||
}
|
||||
}
|
||||
cout<<s<<endl;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user