I am trying to get the highest and lowest number of users entered. I got this. I'm just new in programming, there are 3 errors.
Import java.io. *; The public square throws IOException at the highest level (public static zero main (string [] args) {{BufferedReader dataIn = new BufferedReader (New InputStreamReader (System.in)); Double [] input = new double [8]; Int index Int highIndex = 0; Int lower index = 0; Double zodiac = 0; System.out.println ("Enter the judges scores:"); {System.out.print ("Enter score" + (index + 1) + ":") for (index = 0; index & lt; 8; index ++); Input [index] = double. PRADABB (Data in Redline ()); } (Index = 1; index & lt; 8; index ++) if (input [high index] Input [index] for index (1 = index; index;); index = index; For (index = 0; index Index) {sum = highIndex; } If (zodiac = gt; = index) {index = lowIndex; }} System.out.print ("Highest: + High Index"); System.out.print ("lowest: + less index"); System.out.printf ("The contestant gets the total% .2f", (sum - highIndex - lowIndex)); }}
Although you say there are only 3 errors, a little bit seen there Is more
throws up the static zero main (string [] args) IOException {// & lt; -? {// & lt; Why two curly brackets? For loop
for (index = 0; index; lt; 8; index ++) {// < - curl bracket missing? Sum = sum + input [index]; {Input [index] = double. Try PRADABB (Data in Redline ()); } Hold (IOException e) {e.printStackTrace (); } If (Yoga> Index) {sum = highIndex; } If (zodiac = gt; = index) {index = lowIndex; }} // & lt; - Or extra curl bracket? This line print is highest: + Highindex System.out.print ("Highest: + High Index" ); Anything has been printed in " " as so it Change> System.out.print ("Highest:" + High Indexes); Also applies to
System.out.print ("lowest: + less index");
Are you from C programming, this line is correct
System.out.printf ("The contestant receives the total% .2f "(Yoga - High Index - Low Index)); This can also be written in Java
System.out.println ("Overall Competitor" + (Yoga - High Index - Low Indexes ));
Comments
Post a Comment