Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Acrostic{
- public static void main(String[] args){
- String[][] adjectives = {{ "Astounding", "Academic"},
- { "Bodacious", "Big-headed", "Baller","Boujee"},
- {"Cantankerous","Cool","Comic sans" },
- {"Daring", "Drip", "Drippier", "Drippiest" , "Dapper", "Dank"},
- {"Energetic", "Enormous", "Elegant" },
- {"Funky", "Failure", "Fantastic", "Fresh", "Female", "French", "Fancy" },
- {"Grand" , "Grumpy" , "Grumpy" },
- {"Humble", "Handsome", "Hardworking" },
- { "Icy", "Icier", "Iciest" , "Idiosyncratic" },
- {"Jolly", "Joyful", "Jovial"},
- {"Kempt","Kind", "Kooky", "Kingly", "Keen" },
- {"Lame", "Lit", "Litto","Litolitious","Litacal-Spitical","Lit like a Pick"},
- {"Mercuric", "Merciless", "Man"},
- {"Noisy", "Numeric", "Nice" },
- { "Obnoxious", "Obstreperous" , "Ostrobogulous" , "One Miserable Star" },
- {"Pythagorean", "Poised" },
- { "Quirky", "Quetzalcoatlus" },
- {"Raging","Radical" },
- { "Swag", "Super", "Smashing", "Spooky" , "Sick"},
- { "Tasteless","Triangular","Trigonometric", "Tricky" },
- { "Ugandan", "Ubery" , "Uncle Rico"},
- { "V for Vendetta", "Vicious", "Vigilant"},
- {"Wiggly", "Witty", "Warty" },
- { "Xenophobic","Xerothermic","Xylophonic"},
- { "Yucky", "Yes", "Yummy"},
- { "Zealous","Zig-Zaggy" }};
- Scanner kb = new Scanner(System.in);
- //Prompt and receive name
- System.out.print("Enter your name: ");
- String name = kb.next();
- //Use for loop to split up name
- for(int i = 0; i < name.length(); i++){
- String letter = name.substring(i, i+1).toUpperCase();
- System.out.print(letter + " is for ");
- for(int j = 0; j < adjectives.length; j++){
- if( adjectives[j][0].substring(0,1).equals(letter) ){
- String adjective = adjectives[j][(int)(Math.random()*adjectives[j].length)];
- System.out.println(adjective);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement