Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main3 {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int a = scan.nextInt();
- a = (a-1)%7 ;
- switch(a){
- case 0 -> System.out.println("Minggu");
- case 1 -> System.out.println("Senin");
- case 2 -> System.out.println("Selasa");
- case 3 -> System.out.println("Rabu");
- case 4 -> System.out.println("Kamis");
- case 5 -> System.out.println("Jumat");
- case 6 -> System.out.println("Sabtu");
- }
- }
- }
Add Comment
Please, Sign In to add comment