为什么没有人救命的阿~~~~~~~~~~~~~~~~~~
救命阿~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~````````
55555555555555555555555555555555555555555
帮帮忙嘛~~~~~~~~~~~`````````
就按照Sample Dialogue那样显士`写出来就好了嘛
拜托,救人阿
瑟瑟~~~~~~~~~~~~~~~~~~~~~~~`

解决方案 »

  1.   

    写了,头晕,有没有人帮忙看看阿,是不是很多错,RUN不起呢?
    麻烦帮看看,谢谢
    import java.text.*;
    import java.io.*;
    public class Midterm1
    {
    public static void main (String[] arg) throw java.io.IOException
    {int significance = 0;
    float likelihood = input/100;
    int input;
    input = Integer.parseInt(Line.readline());
    int impact;
    int low_range = 0;
    int high_range = 0;
    int key=0;
    String type,user;
    if(type = discourage)
    {impact==-1;
    low_range += significance;}
    else{impact==1;
    high_range +=significance;}
     sum_weightconsideration = (float) significance*likelihood*impact;
    sum_variable = 1;
    sum_variable += wum_weightconsideration;
     total_range = (float) Math.abs(low_range + high_range);
    value = (float)[(sum_variable - low_range) / total_range]*10;
    DecimalFormat fmt = new DecimalFormat("0.##");
    threshold = (float) Math.abs(low_range / total_range)*10;
    DecimalFormat fmt = new DecimalFormat("0.##");


    BufferedReader Line = new BufferedReader ( new InputStreamReader( System.in));
    while ( another.equalsIgnoreCase ("y"))

    {
    System.out.println ("Enter the consideration or enter \"Ready for recommendation\"(Ready): ");
    key = Line.readLine();
    if (type.equalsIgnoreCase ("Ready"))
    if (sum_weightconsideration < 0)
    ({System.out.println ("Recommendation: Do Not Attack!");}
    else if (sum_weightconsideration > 0)
    ({System.out.println ("Recommendation: Attack!!!!");}
    System.out.println ("Desirability "+ value+"with threshold of "+threshold );
    else{
    System.out.println ("How significant is "+type+ " (0 to 10)?");
    significant= Integer.parseInt ( Line.readLine());
    if (significant<0 ||significant>10)
    {System.out.println ("your input is out of range,please enter another one: ");}
    System.out.println ("What is its likelihood at present (0 to 100): ");
    likelihood= Integer.parseInt ( Line.readLine());
    if (likelihood<0 ||likelihood>100)
    {System.out.println ("your input is out of range,please enter another one: ");}
    System.out.println ("Does"+type+" encourage or discourage attack(D/E)?");
    type = Line.readLine();
    System.out.println ("");

    }System.out.println ("Try another(y/n)?");
    another = Line.readLine(); 
    }
    }
      

  2.   

    我不想检查了5555555555
    我的写东东工具还没弄好,麻烦也看看这个欧
    只是中间换了点
    谢了import java.text.*;
    import java.io.*;
    public class Midterm1
    {
    public static void main (String[] arg) throw java.io.IOException
    {int significance = 0;
    float likelihood = input/100;
    int input;
    input = Integer.parseInt(Line.readline());
    int impact;
    int low_range = 0;
    int high_range = 0;
    int key=0;
    String type,user;
    if(type = discourage)
    {impact==-1;
    low_range += significance;}
    else{impact==1;
    high_range +=significance;}
     sum_weightconsideration = (float) significance*likelihood*impact;
    sum_variable = 1;
    sum_variable += wum_weightconsideration;
     total_range = (float) Math.abs(low_range + high_range);
    value = (float)[(sum_variable - low_range) / total_range]*10;
    DecimalFormat fmt = new DecimalFormat("0.##");
    threshold = (float) Math.abs(low_range / total_range)*10;
    DecimalFormat fmt = new DecimalFormat("0.##");


    BufferedReader Line = new BufferedReader ( new InputStreamReader( System.in));
    while ( another.equalsIgnoreCase ("y"))

    {
    System.out.println ("Enter the consideration or enter \"Ready for recommendation\"(Ready): ");
    key = Line.readLine();

    do{ if(sum_weightconsideration < 0)
    ({System.out.println ("Recommendation: Do Not Attack!");}
    else if (sum_weightconsideration > 0)
    ({System.out.println ("Recommendation: Attack!!!!");}
    System.out.println ("Desirability "+ value+"with threshold of "+threshold );
    }(type.equalsIgnoreCase ("Ready")

    System.out.println ("How significant is "+user+ " (0 to 10)?");
    significant= Integer.parseInt ( Line.readLine());
    if (significant<0 ||significant>10)
    {System.out.println ("your input is out of range,please enter another one: ");}
    System.out.println ("What is its likelihood at present (0 to 100): ");
    input = Integer.parseInt ( Line.readLine());
    if (input < 0 ||input > 100)
    {System.out.println ("your input is out of range,please enter another one: ");}
    System.out.println ("Does"+user+" encourage or discourage attack(D/E)?");
    user = Line.readLine();
    System.out.println ("")
    }System.out.println ("Try another(y/n)?");
    another = Line.readLine(); 
    }
    }