package com.li.branch; public class IfDemo1 { public static void main(String[] args) { //目标if三种方式 //如测量用户体温是否高于37 double t = 38.9; if (t > 37) { System.out.println("赶紧把这个人带走"); } //发红包99元,现在有90 如果不够则提示不足 double money = 99; if (money>= 90) { System.out.println("发红包成功"); }else { System.out.println("不足");} //等级测试 int score = 100 ; if (score >=0&&score<60) { System.out.println("你的绩效成绩是d"); }else if ( (score>=60&&score<80)) { System.out.println("你的绩效成绩是c"); }else if ( (score>=80&&score<90)) { System.out.println("你的绩效成绩是b"); }else if ( (score>=90&&score<110)) { System.out.println("你的绩效成绩是a"); }else{ System.out.println("您录入的分数有毛病"); } } }