阿里的财富(分数我这样表示哪里有问题呢)

我的错误是:

import java.io.PrintStream;

public class Main {
public static void main(String[] args) throws java.io.UnsupportedEncodingException {
    PrintStream ps = new PrintStream(System.out, true, "UTF-8");
    Scanner in = new Scanner(System.in);
    int x = in.nextInt();
    if(x>=500){ps.print("500");}else
    if(x>500 && x<=3600){ps.print(x*(97/100));}else
    if(x>3600 && x<=14400){ps.print(x*(90/100));}else
    if(x>14400 && x<=30000){ps.print(x*(80/100));}else
    if(x>30000){ps.print(x*(50/100));}
    }
}

1 条评论

  • @ 2019-04-11 00:02:23

    既然已经又提问了一遍,而且排版更好,不妨把这个提问删掉,然后把更好的那个提问标题改一下。

  • 1