1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
alexgriva [62]
3 years ago
10

Convert each of the following for loops into an equivalent while loop. (You might need to rename some variables for the code to

compile, since all four parts a-d are in the same scope.)
// a.

System.out.println("a.");
int max = 5;
for (int n = 1; n <= max; n++) {

System.out.println(n);

}

System.out.println();

// b.

System.out.println("b.");

int total = 25;

for (int number = 1; number <= (total / 2); number++) {

total = total - number;

System.out.println(total + " " + number);

}

System.out.println();

// c.

System.out.println("c.");

for (int i = 1; i <= 2; i++) {

for (int j = 1; j <= 3; j++) {

for (int k = 1; k <= 4; k++) {

System.out.print("*");

}

System.out.print("!");

}

System.out.println();

}

System.out.println();

// d.

System.out.println("d.");

int number = 4;

for (int count = 1; count <= number; count++) {

System.out.println(number);

number = number / 2;

}
Computers and Technology
1 answer:
MAVERICK [17]3 years ago
5 0

Answer:

~CaptnCoderYankee

Don't forget to award brainlyest if I got it right!

Download txt
You might be interested in
Which tool should be used to verify the compatibility of an application run on Windows 10?
diamong [38]

I believe A is the answer here.

8 0
4 years ago
Which of the following is a benefit of using a parallel circuit system?
Ad libitum [116K]

The answer is stability. In a parallel circuit the potential source or voltage remains constant even as you add additional load to the circuit. Next would be simplicity and security, do note that the normal and typical circuitry found on household uses parallel circuit model.

7 0
3 years ago
To make your brand colors stand out, it is important to implement what with your color scheme?
qaws [65]

Answer:

All of the above

Explanation:

It's better to have a pattern of colors than one single color in you color scheme.

6 0
3 years ago
Read 2 more answers
Most job applications are online. true or false
Sonja [21]

Answer:

True

Explanation:

4 0
3 years ago
5
vova2212 [387]

Answer:

Document

Explanation:

Document because after you structure your document together the way you like you can add pictures.

3 0
4 years ago
Read 2 more answers
Other questions:
  • PLEASE HELP!!!! I'll mark Brainliest for whoever is first!!!!
    13·2 answers
  • Can anyone help me with getting bash ubuntu on windows setup?
    15·1 answer
  • )the number of levels in a tree is called
    6·1 answer
  • Who were the big players in the yellow journalism movement?
    7·1 answer
  • _An electronic device used for processing data.
    10·2 answers
  • Decide what activity is most appropriate based on the temperature. If the temperature is greater than 80 degrees, then display t
    13·1 answer
  • Consider a hypothetical hard drive that has 400,000 cylinders, 8 heads, and 128 sectors per track. Demonstrate, in writing, how
    9·1 answer
  • Lab Assignment 3 Phase 1 Create a class named Car, which is supposed to represent cars within a Java program. The following are
    6·1 answer
  • Create a Person Class that:
    14·1 answer
  • Which daemon manages the physical memory by moving process from physical memory to swap space when more physical memory is neede
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!