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
|
import
java.util.Scanner;
public
class
A01 {
/**
* @param args
*/
public
static
void
main(String[] args) {
// TODO Auto-generated method stub
Scanner input =
new
Scanner (System.in);
System.out.println(
"我行我素购物管理>客户信息管理>添加客户信息"
);
System.out.print(
"\n请输入会员号<4位整数>:"
);
int
custNo=input.nextInt();
System.out.print(
"请输入会员生日(月/日<用两位数表示>):"
);
String custBirth=input.next();
System.out.print(
"请输入积分:"
);
int
custScore=input.nextInt();
if
(custNo>
999
&&custNo<
10000
){
System.out.println(
"成功录入会员信息:"
);
System.out.println(
"会员号\t生日\t积分"
);
System.out.println(custNo+
"\t"
+custBirth+
"\t"
+custScore);
}
else
{
System.out.println(
"会员号输入有误!"
);
}
}
}
|
本文转自 Y幕徐 51CTO博客,原文链接:http://blog.51cto.com/765133133/1420148