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, 21.06.2019 21:30
Felicia wants to become a head surgeon by december 2013. she designs the career milestones that she would need to complete her goal. by june 2013, she was not licensed. which best describes what she should do?
Answers: 2
question
Computers and Technology, 24.06.2019 02:00
Write an expression that will cause the following code to print "equal" if the value of sensorreading is "close enough" to targetvalue. otherwise, print "not equal". ex: if targetvalue is 0.3333 and sensorreading is (1.0/3.0), output is:
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
Write an assembly language program to input a string from the user. your program should do these two things: 1. count and display the number of words in the user input string. 2. flip the case of each character from upper to lower or lower to upper. for example if the user types in: "hello there. how are you? " your output should be: the number of words in the input string is: 5 the output string is : hello there. how are you?
Answers: 2
question
Computers and Technology, 24.06.2019 22:50
Which of these might be an example of an advertiser's target group? a.people who have no access to media b.people the advertisers know nothing about c. people who watch a variety of tv shows d. people who live in the same region of the country
Answers: 2
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, 11.02.2020 02:28