Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Shavit Borisov
- // CW
- import java.util.Scanner;
- public class Char {
- public static void main(String[] args)
- {
- Scanner in = new Scanner (System.in);
- System.out.println("Enter a char:");
- char ch = in.next().charAt(0);
- System.out.println("Your lowercase letter is: " + ch);
- System.out.println("The next letter is: " + (char)(ch + 1));
- System.out.println("The capital of your letter is: " + (char)(ch - ('a' - 'A')));
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment