Enhanced Test Scores applicationvar total = 0;var entry; var scores = []; var show = "The test scores:\n"; var average; // use a do-while loop to put the scores in an arraydo {entry = prompt("Enter test score\n" +"Or enter 999 to end entries", 999);entry = parseInt(entry);if (entry >= 0 && entry <= 100)="">=> scores[scores.length] = entry;}else if (entry != 999){alert("Entry must be a valid number from 0 " +"through 100\nOr enter 999 to end entries");}}while (entry != 999); // calculate the total of the scores and the average of the scores.if (scores.length != 0) {// use a for loop to process the scoresfor (var i = 0; i < scores.length;="" i++)="">total = total + scores[i]; // both are numbers so addsshow = show + scores[i] + "\n"; // strings & number so concatenates}// calculate the average and displayaverage = parseInt(total/scores.length);alert(show + "\nAverage score is " + average);}
Modify the code above so that the application gets the highest score in the array and displays it below the average score in the alert dialog box:
Problem 2:Converting Fahrenheit to Celsius
Please create a JavaScript application, named as “convert_temps.html”, that converts Fahrenheit temperatures to Celsius temperatures:
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here