aboutsummaryrefslogtreecommitdiff
path: root/Word
diff options
context:
space:
mode:
Diffstat (limited to 'Word')
-rw-r--r--Word/inp0
-rwxr-xr-xWord/mainbin0 -> 24328 bytes
-rw-r--r--Word/main.cpp34
-rw-r--r--Word/main_input0.txt1
-rw-r--r--Word/main_input1.txt1
-rw-r--r--Word/main_input2.txt1
-rw-r--r--Word/main_output0.txt1
-rw-r--r--Word/main_output1.txt1
-rw-r--r--Word/main_output2.txt1
9 files changed, 40 insertions, 0 deletions
diff --git a/Word/inp b/Word/inp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/Word/inp
diff --git a/Word/main b/Word/main
new file mode 100755
index 0000000..01dfeb5
--- /dev/null
+++ b/Word/main
Binary files differ
diff --git a/Word/main.cpp b/Word/main.cpp
new file mode 100644
index 0000000..31937b2
--- /dev/null
+++ b/Word/main.cpp
@@ -0,0 +1,34 @@
+#include<bits/stdc++.h>
+#include <cctype>
+
+using namespace std;
+
+string convertLower(string s) {
+ for(auto &ch : s) {
+ ch = tolower(ch);
+ }
+ return s;
+}
+string convertUpper(string s) {
+ for(auto &ch : s) {
+ ch = toupper(ch);
+ }
+ return s;
+}
+
+int main () {
+ ios_base::sync_with_stdio(false);
+ cin.tie(NULL);
+ string s;
+ cin >> s;
+ int l = 0;
+ int u = 0;
+ for(auto ch : s) {
+ if(islower(ch)) {
+ l++;
+ } else {
+ u++;
+ }
+ }
+ cout << (l < u ? convertUpper(s) : convertLower(s));
+}
diff --git a/Word/main_input0.txt b/Word/main_input0.txt
new file mode 100644
index 0000000..dcf8e7c
--- /dev/null
+++ b/Word/main_input0.txt
@@ -0,0 +1 @@
+HoUse
diff --git a/Word/main_input1.txt b/Word/main_input1.txt
new file mode 100644
index 0000000..619b51b
--- /dev/null
+++ b/Word/main_input1.txt
@@ -0,0 +1 @@
+ViP
diff --git a/Word/main_input2.txt b/Word/main_input2.txt
new file mode 100644
index 0000000..b6751f3
--- /dev/null
+++ b/Word/main_input2.txt
@@ -0,0 +1 @@
+maTRIx
diff --git a/Word/main_output0.txt b/Word/main_output0.txt
new file mode 100644
index 0000000..90dde25
--- /dev/null
+++ b/Word/main_output0.txt
@@ -0,0 +1 @@
+house
diff --git a/Word/main_output1.txt b/Word/main_output1.txt
new file mode 100644
index 0000000..7077ce5
--- /dev/null
+++ b/Word/main_output1.txt
@@ -0,0 +1 @@
+VIP
diff --git a/Word/main_output2.txt b/Word/main_output2.txt
new file mode 100644
index 0000000..f5f6bec
--- /dev/null
+++ b/Word/main_output2.txt
@@ -0,0 +1 @@
+matrix