Created
September 13, 2016 17:52
-
-
Save fandrefh/f8b1a5ce3abf1b22dddffc2ac8cb0878 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Resultado { | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
String op = "*"; | |
int A=7, B=3, R=12; | |
switch (op) { | |
case "-": | |
R = A-B; | |
case "*": | |
R = A*B; | |
case "+": | |
R = A+B; | |
break; | |
case "/": | |
R = A/B; | |
break; | |
default: | |
break; | |
} | |
System.out.println("O Resultado é: " + R); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment