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
umka2103 [35]
3 years ago
8

Given positive integer num_insects, write a while loop that prints that number doubled up to, but without exceeding 100. Follow

each number with a space. Sample output with input: 8 8 16 32 64
Computers and Technology
1 answer:
nasty-shy [4]3 years ago
5 0

Answer:

import java.util.Scanner;

public class CocaColaVendingTest {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter value for number of insects");

       int num_insects = in.nextInt();

       while (num_insects<=100){

           System.out.print(num_insects);

           num_insects*=2;

           System.out.print(" ");

       }

   }

}

Explanation:

In the code above written in Java.

The user is prompted to enter a positive value for the number of insects

This is stored in a variable num_insects.

Using a while loop with the condition while (num_insects<=100). The num_insects is printed out. Then it is doubled followed with a space.

It continues until the condition in the while loop is no longer true

You might be interested in
                                                       HELP PLEASE 
Marina CMI [18]
Your answer should be mode







5 0
3 years ago
Read 2 more answers
An individualized course plan for the 4 years of
spin [16.1K]

Answer:

.....

Explanation:

8 0
3 years ago
Read 2 more answers
Continuous data
Elena-2011 [213]

Answer: Could be subdivided into smaller and smaller units.

Explanation:

 The continuous data are basically measured in the small units and can be easily subdivided into smaller parts without changing their actual meaning.

The continuous data also contain numeric value and can be divided into smaller and finer meaningful parts.

The continuous data can be measured according to the precision of the system. The size and volume are the example of the continuous data.

7 0
4 years ago
Four workers take an extra half-hour for lunch, at a cost of $14/ hour
Usimov [2.4K]

Answer:

whats the rest ?

Explanation:

whats the rest ?

8 0
4 years ago
A small company with 100 computers has hired you to install a local area network. All fo the users perform functions like email,
Nadusha1986 [10]

Answer:

Based on the requirements indicated in the question above, the best Local Area Network (LAN) operating system that can be used is

Windows 7 , 8.1 or Windows 10. This is because they all are configured to handle extensive LAN activity and can connect over 200 users.

Explanation:  

Generally speaking, Windows 10 packs more improvement over the previous windows.

Cheers

6 0
3 years ago
Other questions:
  • One of the difficult decisions a systems analyst has to make when it comes to software is whether to recommend making, buying, o
    8·1 answer
  • A hacker changing the ip addresses used in conjunction with a particular company’s web site to re-route them to the hacker’s ser
    11·1 answer
  • Which are Career and Technical Student Organizations? (Check all that apply.)
    12·1 answer
  • Conversion of a continuous stream of sound into a series of ones and zeroes that can be interpreted by computers results in
    12·1 answer
  • How does technology improve convenience, but impact our privacy?
    8·1 answer
  • Josh wants to convey his best wishes to johnathin for a meeting schedualed later diring the day. Which business documented would
    7·1 answer
  • To prepare a data character for transmission, a ____ bit is added to the beginning of the character and informs the receiver tha
    11·1 answer
  • Claire is trying to listen to her history professor's lecture, but her mind keeps wandering to thoughts about her plans for the
    5·1 answer
  • JAVA
    12·1 answer
  • Kai notices his laptop is running sluggishly, so he wants to check his system resources for any issues. Which utility can he use
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!