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
What is the way to discover requirments for software projects ?
Sav [38]

Learn about requirement analysis by knowing how to identify business requirements and software requirements with ... Here are the objectives for performing requirement analysis in the early stage of a software project:.

6 0
2 years ago
Why should we learn Ethereum? Explain.
Licemer1 [7]

Answer:

<h3><em>Ethereum Benefits</em></h3><h3><em>It has a large and committed global community and the largest ecosystem in blockchain and cryptocurrency. Wide range of functions. Besides being used as a digital currency, Ethereum can also process other financial transactions, execute smart contracts and store data for third-party applications.</em></h3>

Explanation:

<h3><em>Hope this helps and mark as a brianliest</em></h3>
7 0
2 years ago
When it comes to saving money, what is a good rule of thumb?
Leviafan [203]
-Not to make impulse buys
-Open a savings account that directly adds a set amount of money into it from your paycheck monthly 
-The '50-30-20' rule(<span>50 percent of your income toward necessities, like housing and bills. Twenty percent should then go toward financial goals, like paying off debt or </span>saving<span> for retirement. Finally, thirty percent of your income can be allocated to wants, like dining or entertainment.)</span>
-Create a budget 
6 0
3 years ago
Read 2 more answers
New trends, tools, and languages emerge in the field of web technology every day. Discuss the advantages of these trends, tools,
ikadub [295]

Answer:

Explanation:However, with the emergence of several new web development technologies, tools, frameworks, and languages in the last few years, it has now become quite .

7 0
3 years ago
The border that defines the outer boundary of a shape or other object
Over [174]
The answer is outline
8 0
2 years ago
Other questions:
  • The first screen you see when you open word2016 what is called?​
    5·2 answers
  • Test if a number grade is an A (greater than or equal to 90). If so, print "Great!". Sample Run Enter a Number: 98 Sample Output
    7·1 answer
  • Then standard toolbar appears whenever you select text true or fals
    15·1 answer
  • Visual imagery encoding relates to _____ encoding, in that a person is connecting the new information to previously existing inf
    11·1 answer
  • What part of the network is the point where the responsibility of the administrator ends and the telecommunications providers re
    5·1 answer
  • Exercise 4: Bring in program grades.cpp and grades.txt from the Lab 10 folder. Fill in the code in bold so that the data is prop
    12·1 answer
  • What is the cell reference for row 22 and column B? __________<br><br> In excel
    5·1 answer
  • PLEASE ANSWER FAST, WILL GIVE BRAINLIEST AND 20 POINTS
    11·2 answers
  • David is taking a test. To answer a question, he first covers up the answer choices. Next, he tries to answer the question. Then
    15·2 answers
  • which term describes the layer of software that resides between the virtual operating system and the physical hardware it runs o
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!