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
34
35
36
37
38
import 
java.util.Scanner;
 
public 
class 
A02 {
 
    
public 
static 
void 
main(String[] args) {
        
// TODO Auto-generated method stub
        
Scanner input = 
new 
Scanner (System.in);
        
String A=
"y"
;
        
do
{
        
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);
        
System.out.print(
"是否继续(y / n):"
);
        
A=input.next();
    
}
while
(A.equals(
"y"
));
        
System.out.println(
"系统退出"
);
    
}
    
}