subject

The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly.

// Displays five random numbers between
// (and including) user-specified values
import java. util. Scanner;
public class DebugSix4
{
public static void main(String[] args)
{
int high, low, count = 0;
final int NUM = 5;
Scanner input = new Scanner(System. in);
System. out. print("This application displays " + NUM +
" random numbers" +
"\nbetween the low and high values you enter" +
"\nEnter low value now... ");
low = input. nextInt()
System. out. print("Enter high value... ");
high = inputnextInt();
while(low < high)
{
System. out. println("The number you entered for a high number, " +
high + ", is not more than " + low);
System. out. print("Enter a number higher than " + low + "... ");
high = input. nextInt();

while(count < NUM)
{
double result = Math. random();
int answer = (int) (result * 10 + low);
if(answer <= higher)
{
System. out. print(answer + " ");
++count;
}
}
System. out. println("End of Application");
}
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:30
The cm is responsible for overseeing the actions of the crisis management team and coordinating all crisis management efforts in cooperation with disaster recovery and/or business continuity planning, on an as-needed basis
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Kto rozmawia z clamentain przez krótkofalówke w the walking dead która śledzi lee w 4 epizodzie
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
question
Computers and Technology, 24.06.2019 04:10
Write a program that reads a set of floating-point values. ask the user to enter the values, then print • the average of the values. • the smallest of the values. • the largest of the values. • the range, that is the difference between the smallest and largest. of course, you may only prompt for the values once.
Answers: 3
You know the right answer?
The files provided in the code editor to the right contain syntax and/or logic errors. In each case,...
Questions
question
Mathematics, 22.12.2019 17:31
question
Mathematics, 22.12.2019 17:31
question
Mathematics, 22.12.2019 17:31
Questions on the website: 13722363