3
1

Fixed output for switch case and indentation.

This commit is contained in:
K 2024-11-06 15:06:11 +05:30
parent 3c356f5819
commit 7ba888b63e
Signed by: notkshitij
GPG Key ID: C5B8BC7530F8F43F

View File

@ -44,23 +44,23 @@ class A3 {
switch (choice) { switch (choice) {
case 1: case 1:
new A3().add(a, b); System.out.println("Result: " + new A3().add(a, b));
break; break;
case 2: case 2:
new A3().sub(a, b); System.out.println("Result: " + new A3().sub(a, b));
break; break;
case 3: case 3:
new A3().mul(a, b); System.out.println("Result: " + new A3().mul(a, b));
break; break;
case 4: case 4:
new A3().div(a, b); System.out.println("Result: " + new A3().div(a, b));
break; break;
case 5: case 5:
System.out.println("## END OF CODE"); System.out.println("## END OF CODE");
System.exit(0); System.exit(0);
default: default:
System.out.println("Please choose a valid option."); System.out.println("Please choose a valid option.");
break; break;
} }
} }
} }