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
4
Nataly_w [17]

Answer:

5 hours 25 minutes

Explanation:

It takes 25 minutes to finish a hole

It takes 25*13 minutes to finish 13 holes

325 minutes is require to finish 13 holes

Convert 325 minutes to hours and minutes by dividing it by 60

=5 5/12 hours

Convert 5/12 hours to minutes by multiplying by 60

=25 minutes

The answer is 5 hours 25 minutes

5 0
3 years ago
A technician is troubleshooting a Windows system in which an application works properly when the computer is booted in Safe Mode
sweet-ann [11.9K]

Answer:

yoooo nba BAD BAD

Explanation:

3 0
3 years ago
A final class can't be extended.TrueFalse
PIT_PIT [208]

Answer:

True

Explanation:

A final class is something like sealed one and no one can inherit that further.

it is useful to lock our code or functionality from others

4 0
3 years ago
Which of the following can you do under the fair use exceptions?
cricket20 [7]
I would say...

C: Use graphics and content for educational purposes in small amounts if you give the creator credit. 
6 0
3 years ago
Can someone help me?
stich3 [128]

Answer:

2nd one

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • The "fathers of the Internet" are Vinton Cerf and ________. Select one: A. Robert Kahn B. Robert Cailliau C. Tim Berners-Lee D.
    11·1 answer
  • Why is self-esteem important in self-representation
    7·1 answer
  • Follow up, my brother is upset at me for stealing his robux, what should i do?
    11·2 answers
  • Alright, so im currently trying to pass a computer science class. i need it done in a little under 2 weeks. Ill just ask the one
    5·1 answer
  • Conduct online research and provide some guidelines on how to secure a web browser. (CyberSecurity plato)
    10·1 answer
  • High capacity circuits are limited by the least capable network link, which is typically the user connection. As such, it is imp
    11·1 answer
  • hello my friend is doing a give away at 100 followers would you follow him for a chance to win 2000 vbucks his name is ZoVa_Velo
    15·2 answers
  • Number Array Class
    5·1 answer
  • The security administrator for Corp.com wants to provide wireless access for employees as well as guests. Multiple wireless acce
    11·1 answer
  • Choose a problem that lends to an implementation that uses dynamic programming. Clearly state the problem and then provide high-
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!