subject

Fix the 2 error codes. 1 // DebugSix2.java
2 // Display every character between Unicode 65 and 122
3 // Start new line after 20 characters
4 public class DebugSix2
5 {
6 public static void main(String args[])
7 {
8 char letter;
9 int a;
10 final int MIN = 65;
11 final int MAX = 122;
12 final int STOPLINE1 = 85;
13 final int STOPLINE2 = 122;
14 for(a = MIN; a <= MAX; a++)
15 letter = (char)a;
16 System. out. print(" " + letter);
17 if((a == STOPLINE1) & (a == STOPLINE2))
18 System. out. println();
19 System. out. println("\nEnd of application")
20 }
21 }
1 // DebugSix4.java
2 // Displays 5 random numbers between
3 // (and including) user-specified values
4 import java. util. Scanner;
5 public class DebugSix4
6 {
7 public static void main(String[] args)
8 {
9 int high, low, count;
10 final int NUM = 5;
11 Scanner input = new Scanner(System. in);
12 // Prompt user to enter high and low values
13 System. out. print("This application displays " + NUM +
14 " random numbers" +
15 "\nbetween the low and high values you enter" +
16 "\nEnter low value now... ");
17 low = input. nextInt();
18 System. out. print("Enter high value... ");
19 high = input. nextInt();
20 while(low == high)
21 {
22 System. out. println("The number you entered for a high number, " +
23 high + ", is not more than " + low);
24 System. out. print("Enter a number higher than " + low + "... ");
25 high = input. nextInt();
26 }
27
28 while(count < low)
29 {
30 double result = Math. random();
31 // random() returns value between 0 and 1
32 int answer = (int) (result * 10 + low);
33 // multiply by 10 and add low -- random is at least the value of low
34 // only use answer if it is low enough
35 if(answer <= low)
36 {
37 System. out. print(answer + " ");
38 ++count;
39 }
40 }
41 System. out. println();
42 }
43 }

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
Which of the following is a way that advancements in technology improve humans' ability to measure air quality and protect human health? a. air quality data gathered by new instruments can be used to reduce exposure to pollutants. b. new technologies enable natural and human-made pollution sources to be located and monitored. c. air quality data gathered by new instruments can be used to predict trends in pollution over time. d. new technologies allow governments to make informed decisions about the regulation of pollution. (choose more than one)
Answers: 2
question
Computers and Technology, 22.06.2019 12:40
The most complicated four letter word
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
In cell h5 enter a formula that will calculate the percentage of attendees that went to the altamonte springs job fair in 2018.
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
You know the right answer?
Fix the 2 error codes. 1 // DebugSix2.java
2 // Display every character between Unicode 65 an...
Questions
question
Mathematics, 11.02.2021 21:00
question
Mathematics, 11.02.2021 21:00
question
Mathematics, 11.02.2021 21:00
question
Mathematics, 11.02.2021 21:00
question
Mathematics, 11.02.2021 21:00
Questions on the website: 13722362