if else if……else

    1. public static void main(String[] args) {
    2. int mingci = 2;
    3. if(mingci ==1){
    4. System.out.println("奖励4块");
    5. }else if (mingci == 2){
    6. System.out.println("奖励3块");
    7. }else if (mingci ==3){
    8. System.out.println("奖励2块");
    9. }else{
    10. System.out.println("没奖励");
    11. }
    12. }

    奖励3块