create robot in kotlin Ring the alarm on time Make coffee Heat the water to a suitable temperature Pack your bag (Keep only appropriate books for the day) Cook breakfast and lunch Iron the clothes
import java.util.Scanner;
public class Kotlin {
public static void main(String args[]){
int time;
System.out.println("Enter scheduled time:");
Scanner sc= new Scanner(System.in);
time =sc.nextInt();
System.out.println(time);
switch(time){
case 8:
System.out.println("Coffee preparation started");
System.out.println("Coffee has been prepared");
break;
case 9:
System.out.println("Water heating started");
System.out.println("Water has been boiled");
break;
case 10:
System.out.println("Bag packing has been started");
System.out.println("Bag has been packed");
break;
case 11:
System.out.println("Lunch preparation has been started");
System.out.println("Lunch has been prepared");
break;
case 12:
System.out.println("Iron the cloths");
System.out.println("Iorn of the clothing has been done.");
break;
default:
if(time<8){
System.out.println("Don't worry, you have enough time");
}else{
System.out.println("Opps!You are very late");
}
}
}
}
Comments
Leave a comment