1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
import
java.util.Scanner;
public
class
A01 {
public
static
void
main(String[] args) {
// TODO Auto-generated method stub
Scanner input =
new
Scanner (System.in);
System.out.println(
"*************购 物 管 理 系 统************"
);
System.out.println(
"\t\t1.注册"
);
System.out.println(
"\t\t2.登录"
);
System.out.println(
"\t\t3.抽奖"
);
System.out.println(
"*****************************************"
);
System.out.println(
"\n请选择菜单:"
);
int
choice= input.nextInt();
String show=
""
;
switch
(choice) {
case
1
:
show=
"执行注册"
;
break
;
case
2
:
show=
"执行登录"
;
break
;
case
3
:
show=
"执行抽奖"
;
break
;
default
:
show=
"输入有误"
;
break
;
}
System.out.println(show);
}
}
|
本文转自 Y幕徐 51CTO博客,原文链接:http://blog.51cto.com/765133133/1421189