java吧 关注:1,255,048贴子:12,743,411
  • 3回复贴,共1

求大佬帮助 我这运行不了 怎么回事 而且要有计算 用什么方法

只看楼主收藏回复

import java.util.Scanner;
public class kiuanxi {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int shuru = sc.nextInt();
System.out.println("输入消费金额,可获得折扣");
if(shuru>1||shuru<500){
System.out.println("不打折");
} else if (shuru > 500 || shuru <= 1000/9.5) {
System.out.println("恭喜!9.5折");
} else if (shuru > 1000 || shuru < 2000) {
System.out.println("恭喜8折");
} else if (shuru > 2000) {
System.out.println("恭喜7折");
}
}
}


1楼2020-10-23 13:26回复
    加我1442841853,可以帮你解答问题


    IP属地:陕西来自Android客户端2楼2020-10-23 17:03
    回复
      逻辑上怪怪的,就不说了。
      你怎么判断不能运行的,把这个依据,截图出来,别人才能猜。


      IP属地:广东3楼2020-10-23 17:36
      回复
        if(shuru>1||shuru<500){什么东西?


        4楼2020-10-23 17:48
        回复