Advertisement
jbozhich

#19 on page 179

Sep 30th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.44 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class ShareSolution
  3. {
  4.  
  5.     public static void main(String[] args)
  6.     {
  7.         int key = 3;
  8.         switch (key + 1)
  9.         {
  10.         case 1:
  11.             System.out.println("Cake");
  12.         break;
  13.         case 2:
  14.             System.out.println("Pie");
  15.         break;
  16.         case 3:
  17.             System.out.println("Ice Cream");
  18.         break;
  19.         case 4:
  20.             System.out.println("Cookies");
  21.         break;
  22.         default:
  23.             System.out.println("Your fat butt needs to diet.");
  24.         }
  25.  
  26.     }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement