diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2023-02-22 20:18:04 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2023-02-22 20:18:04 +0200 |
| commit | ef9dfb5d8bfa705a0c056a2652d298e5ebb763fb (patch) | |
| tree | a3ae50170dcaa0982a2680fb9df2c1a8ec179bb4 /codeforces/Word/main.cpp | |
| parent | 6fd4c8747f798b62428ca020171596b8636a7a4c (diff) | |
| download | competitive-programming-ef9dfb5d8bfa705a0c056a2652d298e5ebb763fb.tar.xz competitive-programming-ef9dfb5d8bfa705a0c056a2652d298e5ebb763fb.zip | |
Solved a bunch of problems
Diffstat (limited to 'codeforces/Word/main.cpp')
| -rwxr-xr-x | codeforces/Word/main.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/codeforces/Word/main.cpp b/codeforces/Word/main.cpp index 31937b2..d32a6ca 100755 --- a/codeforces/Word/main.cpp +++ b/codeforces/Word/main.cpp @@ -1,30 +1,30 @@ -#include<bits/stdc++.h> +#include <bits/stdc++.h> #include <cctype> using namespace std; string convertLower(string s) { - for(auto &ch : s) { + for (auto &ch : s) { ch = tolower(ch); } return s; } string convertUpper(string s) { - for(auto &ch : s) { + for (auto &ch : s) { ch = toupper(ch); } return s; } -int main () { - ios_base::sync_with_stdio(false); - cin.tie(NULL); +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)) { + for (auto ch : s) { + if (islower(ch)) { l++; } else { u++; |
