Skip to content
sahunisha77 edited this page Jan 20, 2022 · 2 revisions

Lower to UpperCase code

public class CodesCracker { public static void main(String[] args) { char ch; int ascii; Scanner scan = new Scanner(System.in);

  System.out.print("Enter a Character in Lowercase: ");
  ch = scan.next().charAt(0);
  
  ascii = ch;
  ascii = ascii - 32;
  ch = (char)ascii;
  
  System.out.println("\nEquivalent Character in Uppercase = " +ch);

} }

ASCII value of uppercase alphabets – 65 to 90.

ASCII value of lowercase alphabets – 97 to 122.