日期:2014-05-17 浏览次数:20869 次
package csdn.p36; import java.util.Scanner; /** * Created by IntelliJ IDEA. * User: gaoyong * Date: 2011-10-30 * Time: 17:36:27 * To change this template use File | Settings | File Templates. */ public class Threelianxi { public static void main(String[] args){ Scanner input = new Scanner(System.in); System.out.print("请输入你的年龄:"); int old = input.nextInt(); System.out.print("请输入你的性别:"); String nan = input.next(); if (old>=5&&old<=7&& nan.equals("男")){ System.out.println("你可以搬桌子。"); } else { System.out.println("!"); } } }