Here is the problem question ~~~~~ import java.util.Scanner;
public class Word {
public static void main(String[] args) {
Scanner input = new Scanner (System.in);
String str=input.next();
int lower=0;
int upper=0;
//System.out.println(str);
for (int i=0 ;i<str.length();i++) {
int num=str.charAt(i) ;
System.out.println(num);
if (num>= 97 || num<= 122 ) {
lower++;
System.out.println(lower+"L");}
else //if (num>= 65 || num<= 90 )
{
upper++;
System.out.println(upper+"U");
}}
System.out.println(lower +" "+ upper);
if (lower>= upper)
str=str.toLowerCase();
else //if (lower<upper)
str=str.toUpperCase();
System.out.println(str);
input.close();
}
}
~~~~~ I have no idea why my output comes out as lowercase only! beside please, if you see that I need a bit of advice to improve myself at PS don't hesitate to tell me so because while I am reading the question I know 100% that the answer is so easy and I still struggle to find a solution to the problem. and I am solving currently at level A.
Thanks All.