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
Suppose you observe that your home PC is responding very slowly to information requests from the net. And then you further obser
atroni [7]

ANSWER: BOT

EXPLANATION: When a PC is experiencing the listed effects, it thus depicts that the PC is under attack by a bot, which is a type of script or software application that establishes automated tasks via command.

However, a bad bots often initiate malicious tasks that gives room for attackers to take control over an affected PC remotely, most especially for fraudulent activities.

When several affected computers are connected, they form a botnet connection.

6 0
2 years ago
In an ipv4 address, what are the maximum number of bits that can be used to identify the network address
Solnce55 [7]
Up to 24 bits can be used to identify unique <span>networks.</span>
5 0
3 years ago
I am trying to figure out why I keep having the errors on the right side.
Y_Kistochka [10]

Shut down your computer and try again.

6 0
2 years ago
A "start transaction" is set to be the system's first screen displayed once you log in to GCSS-Army. Setting up a start transact
ANEK [815]
It is d performed monthly
7 0
3 years ago
What is the internet?
aliya0001 [1]
What you're currently on. or a global computer network providing a variety of information and communication facilities, consisting of interconnected networks using standardized communication protocols.
7 0
3 years ago
Read 2 more answers
Other questions:
  • One of the original forms of viruses, is usually stored on some form of removable media. When the removable media is connected t
    9·1 answer
  • I have a problem with importing excel file into Access. I have some table in Excel and I want to import it into Access. When I d
    6·2 answers
  • You just bought a hard drive, you plan on using this a secondary storage, once installed, what needs to be done to the drive and
    6·1 answer
  • Which of the following is the MOST sensitive Personally Identifiable Information (PII) and should be shared cautiously and only
    8·1 answer
  • The ________ option contains the formatting and placeholders for all of the items that appear on a side.
    11·1 answer
  • This is a human-made physical system.
    15·1 answer
  • How i simplify this boolean expression ?A'.B'.C'+A'.B'.C+A'.B.C+A.B'.C+A.B.C
    6·2 answers
  • simplify the expression below and state the value of m for which the simplified expression is not defined 2m² + m - 15/ m² - 9​
    5·1 answer
  • Released in 1976, the Apple I was Apple Computer's first product.<br><br> O True<br> O False
    6·1 answer
  • What is an analog computer?<br>​
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!