Home  >  Q&A  >  body text

Teacher, I used this method for this question. It’s not that members can’t output it. Please comment what is wrong?

import java.util.Scanner;
public class IfElse01 {
public static void main(String[] args) {
/*Exercise: Ordinary customers get a 10% discount on purchases over 100 yuan, members shop 8.50% off
Members will receive a 25% discount on purchases over 200 yuan, and the total amount will be output at the end.
          */
                                                                                                                                                         .                 ‐ to Scanner input = new  (System.in);                                     –    

阿智阿智1872 days ago1417

reply all(1)I'll reply

  • 杰瑞米

    杰瑞米2021-01-07 17:59:48

    It’s not that the member’s else position is wrong. There should be another one above the else}

    reply
    0
  • Cancelreply