Toggle navigation
HUSTOJ
F.A.Qs
Web Board
ProblemSet
Source/Category
Status
Ranklist
Contest
Recent
Login
Problem1361--switch-case:四则运算
1361: switch-case:四则运算
Time Limit:
1 Sec
Memory Limit:
128 MB
Submit:
5
Solved:
2
[
Submit
] [
Status
] [
Web Board
] [Creator:
]
Description
根据不同的四则运算符(+、-、*、/),对两个整数执行相应的运算并输出结果
例如:输入的运算符为乘号’*’,则对这两个实数进行乘法运算
Sample Input
3 5 *
Sample Output
15
HINT
如何获得从键盘输入的一个字符:
Scanner sc = new Scanner(System.in);
char op=sc.next().charAt(0);
Source/Category