1-/* N3456 2 7 8 9 10- import java.util.Scanner; 11 public class Quiz7_averageScores_00 12-{ 13 - 14 15 16 17 18 Java Provided * Quiz7_averageScores_00. Modify this program to 1. Request certain number of decimals in certain range a. the decimal is within certain range (0-100) b. user will decide how many scores to enter 19 20 21 22 23 24 25 26 27 28 29 2. Calculate the average 3. Display the result in certain format 30 31 32 33 34 35 36 37 } public static void main(String[] args) { System.out.println("This is a program for Quiz7 by Li Ma.\n"); //use your name instead } int cnt=0; double v, total=0; double avg; Scanner minput = new Scanner(System.in); //Request certain number of scores //repeat requesting 5 times to get 5 scores?! int i=0; while (i<5) { } System.out.print("Please enter a score (0-100): "); v = minput.nextDouble(); total += v; cnt++; i++; //Calculate the average avg total/cnt; //Display the result in certain format System.out.printf("The average of entered scores is %.1f", avg); This is a program for Quiz7 by Li Ma. Please enter a score (0-100): 45 Please enter a score (0-100): 6.4332 Please enter a score (0-100): 98.5 Please enter a score 65 Please enter a score (0-100): -32 72 The average of entered scores is 36.6 input

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Can you please help me modify this program as in the instructions in the red circle?

This is a java program. I need the output to be the same as in the example picture (same picture with the red circle)

Quiz7_averageScores_00.Java
Modify this program to
1. Request certain number of decimals in certain range
a. the decimal is within certain range (0-100)
}
* 2. Calculate the average
3. Display the result in certain format
b. user will decide how many scores to enter
*/
import java.util.Scanner;
public class Quiz7_averageScores_00
{
Provided
}
public static void main(String[] args) {
System.out.println("This is a program for Quiz7 by Li Ma.\n"); //use your name instead
int cnt=0;
double v, total=0;
double avg;
Scanner minput = new Scanner(System.in);
//Request certain number of scores
//repeat requesting 5 times to get 5 scores
int i=0;
while (i<5) {
}
System.out.print("Please enter a score (0-100): ");
V = minput.nextDouble();
total += v;
cnt++;
i++;
//Calculate the average
avg total/cnt;
//Display the result in certain format
System.out.printf("The average of entered scores is %.1f", avg);
Transcribed Image Text:Quiz7_averageScores_00.Java Modify this program to 1. Request certain number of decimals in certain range a. the decimal is within certain range (0-100) } * 2. Calculate the average 3. Display the result in certain format b. user will decide how many scores to enter */ import java.util.Scanner; public class Quiz7_averageScores_00 { Provided } public static void main(String[] args) { System.out.println("This is a program for Quiz7 by Li Ma.\n"); //use your name instead int cnt=0; double v, total=0; double avg; Scanner minput = new Scanner(System.in); //Request certain number of scores //repeat requesting 5 times to get 5 scores int i=0; while (i<5) { } System.out.print("Please enter a score (0-100): "); V = minput.nextDouble(); total += v; cnt++; i++; //Calculate the average avg total/cnt; //Display the result in certain format System.out.printf("The average of entered scores is %.1f", avg);
OnlineGDB beta
online compiler and debugger for c/c++
Welcome, Li Ma
CS140_Repetitions
Create New Project
My Projects
Classroom new
Learn Programming
Programming Questions
Upgrade
Logout
fy+
Microsoft
Choose the right virtual
machines for your
workloads and reduce
costs.
ADS VIA CARBON
<
SPONSOR Microsoft Azure-Code in Node.js, Java, Python, and other open-source languages.
Stop Share Saved {} Beautify *
Ⓒ Debug
Quiz5_averageVal... Quiz7_averageSco...
1- /*
2
ANH LA CO NHIONNNNNNNN mi mi mi mi mi mi m
3
4
5
6
7
8
9
13-
10 import java.util.Scanner;
14
11 public class Quiz7_averageScores_00
12 - {
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
* Quiz7_averageScores_00. Java - Provided
Modify this program to
1. Request certain number of decimals in certain range
a. the decimal is within certain range (0-100)
b. user will decide how many scores to enter
36
Run
2. Calculate the average
3. Display the result in certain format
37 }
public static void main(String[] args) {
System.out.println("This is a program for Quiz7 by Li Ma.\n"); //use your name instead
}
int cnt=0;
double v, total=0;
double avg;
Scanner minput = new Scanner(System.in);
//Request certain number of scores
//repeat requesting 5 times to get 5 scores
int i=0;
while (i<5) {
System.out.print("Please enter a score (0-100): ");??
}
v =
total + v;
cnt++;
i++;
//Calculate the average
avg= total/cnt;
//Display the result in certain format
System.out.printf("The average of entered scores is %.1f", avg);
This is a program for Quiz7 by Li Ma.
Please enter a score (0-100): 45
Please enter a score (0-100): 6.4332
Please enter a score (0-100): 98.5
Please enter a score (0-100): 65
Please enter a score (0-100): -32
The average of entered scores is 36.6
72
...Program finished with exit code 0
Press ENTER to exit console.
input
Transcribed Image Text:OnlineGDB beta online compiler and debugger for c/c++ Welcome, Li Ma CS140_Repetitions Create New Project My Projects Classroom new Learn Programming Programming Questions Upgrade Logout fy+ Microsoft Choose the right virtual machines for your workloads and reduce costs. ADS VIA CARBON < SPONSOR Microsoft Azure-Code in Node.js, Java, Python, and other open-source languages. Stop Share Saved {} Beautify * Ⓒ Debug Quiz5_averageVal... Quiz7_averageSco... 1- /* 2 ANH LA CO NHIONNNNNNNN mi mi mi mi mi mi m 3 4 5 6 7 8 9 13- 10 import java.util.Scanner; 14 11 public class Quiz7_averageScores_00 12 - { 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 * Quiz7_averageScores_00. Java - Provided Modify this program to 1. Request certain number of decimals in certain range a. the decimal is within certain range (0-100) b. user will decide how many scores to enter 36 Run 2. Calculate the average 3. Display the result in certain format 37 } public static void main(String[] args) { System.out.println("This is a program for Quiz7 by Li Ma.\n"); //use your name instead } int cnt=0; double v, total=0; double avg; Scanner minput = new Scanner(System.in); //Request certain number of scores //repeat requesting 5 times to get 5 scores int i=0; while (i<5) { System.out.print("Please enter a score (0-100): ");?? } v = total + v; cnt++; i++; //Calculate the average avg= total/cnt; //Display the result in certain format System.out.printf("The average of entered scores is %.1f", avg); This is a program for Quiz7 by Li Ma. Please enter a score (0-100): 45 Please enter a score (0-100): 6.4332 Please enter a score (0-100): 98.5 Please enter a score (0-100): 65 Please enter a score (0-100): -32 The average of entered scores is 36.6 72 ...Program finished with exit code 0 Press ENTER to exit console. input
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education