Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.97 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class Zeta {
  4.     public static void main( String [] args )
  5.     {
  6.         Scanner in = new Scanner(System.in);
  7.         int input;
  8.         int a;
  9.         String ls;
  10.         int o=0;
  11.         String asg;
  12.  
  13.         do {
  14.             System.out.print("1.Draw \n");
  15.             System.out.print("2.Write Memo \n");
  16.             System.out.print("3.Exit \n");
  17.  
  18.             do {
  19.                 System.out.print("Input choice [1..3] : ");
  20.                 input=in.nextInt();
  21.             } while (input<1 || input>3 );
  22.  
  23.             if (input == 1) {
  24.                 do {
  25.                     System.out.println("1.gambar segitiga: ");
  26.                     System.out.println("2.gambar persegi: ");
  27.                     System.out.println("3.gambar jajargenjang: ");
  28.                     System.out.println("4.balik ke menu awal ");
  29.                     do {
  30.                         System.out.print("input choice [1..4]");
  31.                         a=in.nextInt();
  32.                     } while (input<1 || input>4);
  33.                     if (a == 1) {
  34.                         System.out.print("input size:");
  35.                         int g= in.nextInt();
  36.                     } else if (a == 2) {
  37.                         System.out.print("input size:");
  38.                         int l=in.nextInt();
  39.                     } else if (a==3) {
  40.                         System.out.print("input size:");
  41.                         int ret=in.nextInt();
  42.                     } else if (a==4) {
  43.                         break;
  44.                     }
  45.                 } while (true);
  46.             } else if (input == 2) {
  47.                 System.out.println("tulis memo:");
  48.                 do{
  49.                     ls = "end memo";
  50.                     o++;
  51.                     System.out.print(o);
  52.                     asg=in.nextLine();
  53.                 } while(asg != ls);
  54.             } else if (input==3) {
  55.                 break;
  56.             }
  57.         } while (true);
  58.     }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement