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 21:00
Describir textbook icon_person mira los dibujos y describe lo que está pasando. usa los verbos de la lista.
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. sean is a computer programmer. he has programmed an application for toddlers that plays nursery rhymes. however, a logic error has occurred in the program. which problem is a likely consequence of the error? a. the program crashes every time the user wants to play the nursery rhymes. b. the program crosses its buffer boundaries and overwrites an adjacent program. c. the program plays a different nursery rhyme than the one the user intended to play. d. the program shows different structures in its programming language code. e. the program introduces new viruses every time the user plays a nursery rhyme.
Answers: 1
question
Computers and Technology, 24.06.2019 00:20
Describe a data structures that supports the stack push and pop operations and a third operation findmin, which returns the smallest element in the data structure, all in o(1) worst-case time.
Answers: 2
question
Computers and Technology, 24.06.2019 02:50
Be sure to answer all parts. synthesize the following compound from benzene. a. b. c. d. e. f. reaction [1] conditions: a b c d e f reaction [1] product: draw structure reaction [2] conditions: a b c d e f reaction [2] product: draw structure reaction [3] conditions: a b c d e f reaction [3] product:
Answers: 3
You know the right answer?
Fix the 2 error codes. 1 // DebugSix2.java
2 // Display every character between Unicode 65 an...
Questions
question
Mathematics, 04.03.2021 21:20
question
Biology, 04.03.2021 21:20
question
Mathematics, 04.03.2021 21:20
Questions on the website: 13722363