Advertisement
Rofyda_Elghadban1

Untitled

Sep 10th, 2022
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <cstdlib>
  6. #include <limits.h>
  7. #include <string>
  8.  
  9. #define ll long long
  10.  
  11. using namespace std;
  12. void Fast_IO();
  13. void Rofyda_Elghadban(){
  14. #ifndef ONLINE_JUDGE
  15. freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
  16. #endif
  17. }
  18.  
  19. /*ll gcd(ll num1,ll num2){
  20. while(num2!=0){
  21. ll temp=num1;
  22. num1=num2;
  23. num2=temp%num1;
  24. }
  25. return num1;
  26. }
  27.  
  28. ll lcm(ll num1,ll num2){
  29. return(num1/gcd(num1,num2))*num2;
  30. }*/
  31.  
  32. int main()
  33. { Rofyda_Elghadban();
  34. //Fast_IO();
  35. //freopen("input.txt","r",stdin);
  36. //freopen("output.txt","r",stdout);
  37. string s;
  38. cin>>s;
  39. int capital=0,small=0;
  40. for(int i=0;i<s.size();i++){
  41. if(s[i]>=65&&s[i]<=90){
  42. capital++;
  43. }else if(s[i]>=97&&s[i]<=122){
  44. small++;
  45. }
  46. }if(capital>small){
  47. for(int i=0;i<s.size();i++){
  48. s[i]-=32;
  49. cout<<s[i];
  50. }
  51. }else if(small>=capital){
  52. for(int i=0;i<s.size();i++){
  53. s[i]+=32;
  54. cout<<s[i];
  55. }
  56. }
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. return 0;
  64. }
  65.  
  66.  
  67.  
  68.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement