Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ch6ex18;
- import java.util.Scanner;
- public class Ch6Ex18
- {
- public static void main(String[] args)
- {
- Scanner sc=new Scanner(System.in);
- System.out.print("Enter your first name: ");
- String first=sc.nextLine();
- first=first.toLowerCase();
- char[] fArray=first.toCharArray();
- System.out.print("Enter your middle name: ");
- String middle=sc.nextLine();
- middle=middle.toLowerCase();
- char[] mArray=middle.toCharArray();
- System.out.print("Enter your last name: ");
- String last=sc.nextLine();
- last=last.toUpperCase();
- char[] lArray=last.toCharArray();
- System.out.println("Your monogram is: "+fArray[0]+lArray[0]+mArray[0]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement