anyone of class 10icse ?
give me the coding of imp programs in the link please
Answers
switch case program to select days of week
import java.util.*;
class week
{
public static void main (String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("1.monday");
System.out.println("2.tuesday");
System.out.println("3.wednesday");
System.out.println("4.thursday");
System.out.println("5.friday");
System.out.println("6.saturday");
System.out.println("7.sunday");
System.out.println("pls make ur choice");
int ch=sc.nextInt();
switch (ch)
{
case 1: System.out.println();
System.out.println();
break;
case 2: System.out.println();
break;
.
.
.
case 7: System.out.println();
break;
default: System.out.println("invalid");
}
}
}
dear friend it is just a sample program in this you may write any content in printing statement
as well as it is important to write break else fall through will be executed
hope it helps if any doubts may follow