import java.util.Scanner;
class SWITCH22
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.println("enter a:");
int a = sc.nextInt();
int b=10;
switch(a){
case 1:
if(a== 100){
b+=5 ;
System.out.print(b) ;
break;
}
case 2:
if(a!=100)
{
b=b*a ;
System.out.print(b) ;
break;
}
}
}
}
correct this program and resend it
Answers
Answered by
1
import java.util.Scanner;
class SWITCH22
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.println("enter a:");
int a = sc.nextInt();
int b=10;
switch(a){
case 100:
b+=5 ;
System.out.print(b) ;
break;
default:
b=b*a ;
System.out.print(b);
}
}
}
.
.
.
.
.
HOPE THIS HELPS YOU
.
.
.
.
PLEASE MARK AS BRAINLIEST AND FOLLOW ME TOO
Similar questions