package lianhua;
public class Fhf {
public static void main(String[] args) {
// TODO Auto-generated method stub
int phonenumber=123456789;//创建变量,保存电话号码
if(phonenumber!=84972266) {//如果此号码不是8497226
System.out.println("对不起,您拨打的号码不存在!");//提示号码不存在
}
}
}
package lianhua;
public class Ddf {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("欢迎光临,请问有多少人用餐?");
int count =9;
System.out.println("回答:"+count+"人");
if(count<=4) {
System.out.println("客人请到大厅4人桌用餐");
}else if(count>4&count<=8) {
System.out.println("客人请到大厅8人桌用餐");
}else if(count>8&count<=16) {
System.out.print("客人请到楼上包厢用餐");
}else {
System.out.println("抱歉,我们店暂时没有这么大的包厢");
}
}
}