YMANA, MICO A.
TVL – ICT : ALONZO
FT-PT #2
import java.util.Scanner; // in this line, here we imported the java utility which is the
scanner. // as usual, we use the java main method.
class Main { public static void
main(String[] args) {
Scanner myObj = new Scanner(System.in);
// in this line, we defined the variable.
int day;
/*This is where we put the scanner using "myObj" with
the print line that contains the requested input*/
System.out.println("Enter Number 1-7:"); day =
myObj.nextInt();
switch (day) {
case 1:
System.out.println("Monday.");
break;
case 2:
System.out.println("Tuesday.");
break; case 3:
System.out.println("Wednesday."); break; case 4:
System.out.println("Thursday"); break;
case 5:
System.out.println("Friday"); break;
case 6:
System.out.println("Saturday"); break;
case 7:
System.out.println("Sunday"); Break;
default:
System.out.println("Invalid Number Input"); break;
}
}
}