Saved Bookmarks
| 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 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 |
|
Answer» rt 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) ; default: b=b*a ; System.out.print(b); } } } . . . . . HOPE THIS HELPS YOU . . . . PLEASE MARK AS BRAINLIEST AND FOLLOW ME TOO |
|