tfkhdyt

Kelulusan (Req. By Mahmud Hardy)

May 11th, 2021 (edited)
263
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2. class kelulusan{
  3.   public static void main(String[] args){
  4.     Scanner in = new Scanner(System.in);
  5.     String output = "";
  6.     int pilihan;
  7.     System.out.print(
  8.       "1 = Bisa hadir offline \n" +
  9.       "2 = Jaringan bagus \n" +
  10.       "3 = Tidak bisa hadir offline dan jaringan tidak bagus \n\n" +
  11.       "Masukkan pilihan : "
  12.     );
  13.     pilihan = in.nextInt();
  14.     switch(pilihan){
  15.       case 1 :
  16.         output = "Sampai jumpa dikelas offline";
  17.         break;
  18.       case 2 :
  19.         output = "Silakan ikut kelas online";
  20.         break;
  21.       case 3 :
  22.         output = "Sampai jumpa tahun depan";
  23.         break;
  24.       default:
  25.         output = "Pilihan tidak valid";
  26.         break;
  27.     }
  28.     System.out.println("\n" + output);
  29.     in.close();
  30.   }
  31. }
  32. // Output:
  33. // https://ibb.co/fdg40XY
RAW Paste Data