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
Why would an online survey of 2,000 visitors to your college’s Web site be of little use in assessing the neighboring community’
musickatia [10]

Answer: the sample is not representative of the community.

Explanation:

Online surveys or surveys in general are made to obtain relevant information about a particular issue. If samples are not representative of that issue, they end up having little use.  

4 0
3 years ago
Olivia has developed a great presentation with a distinct purpose and excellent content. She delivered it in a workshop and got
Umnica [9.8K]

less time and depth is required for panel discussions

3 0
3 years ago
You are asked to develop a cash register for a fruit shop that sells oranges and apples. The program will first ask the number o
vaieri [72.5K]

Answer:

customers = int(input("How many customers? "))

for i in range(customers):

   name = input("Name of Customer " + str(i+1) + " ")

   

   print("Oranges are $1.40 each.")

   oranges = int(input("How many Oranges? "))

   

   print("Apples are $.75 each.")

   apples = int(input("How many Apples? "))

   

   bill = oranges * 1.4 + apples * 0.75

   

   print(name + ", you bought " + str(oranges) + " Orange(s) and " + str(apples) + " Apple(s). Your bill is $%.1f" % bill)

Explanation:

*The code is in Python.

Ask the user to enter the number of customers

Create a for loop that iterates for each customer. Inside the loop, ask the user to enter the name, number of oranges, number of apples. Calculate the bill. Print the name, number of oranges, number of apples bought and total bill

5 0
3 years ago
1.an electronic index of books A. web page
zimovet [89]
It was quite difficult to understand what you need. Anyway, I've got it. I guess you need to much all the terms to each sentence. So I think I've done it right. Check it out:

1.an electronic index of books - <span>B. computer catalog
</span><span>
2.a device which categorizes and locates web sites - </span><span>H. search engine
</span><span>
3.to draw a conclusion - </span>D. infer<span> 

4.a block of information stored in an HTML file on a server - </span><span>A. web page
</span><span>
5.the table of contents of a web site - </span><span>G. home page
</span><span>
6.a software package which retrieves information from any or all available Internet servers - </span><span>I. browser
</span><span>
7.a highlighted word or phrase within a web page which acts as a "bridge" to another web page or site - </span><span>F. hyperlink
</span><span>
8.a topic sentence - </span><span>C. key sentence
</span><span>
9.a term which aids in narrowing a web search - </span>E. keyword
5 0
3 years ago
Its made up of a small memory chips on a card that can hold data in an electronic format​
valina [46]

The chip can allow you to have more data and more pictures so your phone does not become slow and messages and apps and more.

4 0
3 years ago
Other questions:
  • This provides an easy method for workers to use their computers.
    11·2 answers
  • Many who enter the field of information security are technical professionals such as __________ who find themselves working on i
    13·1 answer
  • On the Insert tab, select Table &gt; _______ to create a table from selected text.
    14·1 answer
  • When records are in ____ order, they are arranged one after another on the basis of the value in a particular field.?
    9·1 answer
  • Who initially developed what is now known as the internet?
    5·1 answer
  • What type of error results from an error in the formatting of the program code?
    13·1 answer
  • FFFFFFFFFRRRRRRRRRRRRRRRRRREEEEEEEEEEEEEEEEEEEEEEE
    10·2 answers
  • List 100 social media with functions​
    7·1 answer
  • The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound. 1. Declare a const named CENTS_PER_POUND and initi
    12·1 answer
  • Print ___________ command is used for adding numbers.​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!