Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- public class hello {
- public static void main(String[] args) throws IOException {
- BufferedReader inputW=new BufferedReader(new InputStreamReader(System.in));
- System.out.println("安安你好,你正常嗎?1:正常,2:不正常");
- boolean health=false;
- int health_t,height,weight,age;
- health_t=Integer.parseInt(inputW.readLine());
- if(health_t==1||health_t==2){
- if(health_t==1)
- health=true;
- else
- health=false;
- }
- else
- System.out.println("請勿亂按鍵盤");
- System.out.println("請輸入身高");
- height=Integer.parseInt(inputW.readLine());
- System.out.println("請輸入體重");
- weight=Integer.parseInt(inputW.readLine());
- System.out.println("請輸入年齡");
- age=Integer.parseInt(inputW.readLine());
- System.out.println("PROCESSING..............");
- if(!health)
- System.out.println("等你舒服點再玩");
- else if(height<130||weight<35)
- System.out.println("等你大隻點再來玩");
- else if(age<7)
- System.out.println("爸爸媽媽呢?");
- else
- System.out.println("歡迎~");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement