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
weqwewe [10]
3 years ago
8

Given positive integer numInsects, write a while loop that prints that number doubled without reaching 200. Follow each number w

ith a space. After the loop, print a newline. Ex: If numInsects = 16, print:16 32 64 128 import java.util.Scanner;public class InsectGrowth {public static void main (String [] args) {int numInsects;Scanner scnr = new Scanner(System.in);numInsects = scnr.nextInt(); // Must be >= 1/* Your solution goes here */}}
Computers and Technology
1 answer:
True [87]3 years ago
5 0

Answer:

The below code is pasted in the place of "/*Your solution goes here */"

while(numInsects<200) // while loop

       {

            System.out.print(numInsects+" "); // print statement

            numInsects=numInsects*2; // operation to print double.

       }

Output:

  • If the user gives inputs 16 then the output is 16 32 64 128.
  • If the user gives inputs 25 then the output is 25 50 100.

Explanation:

  • The above code is in java language in which the code is pasted on the place of "Your solution" in the question then only it can work.
  • Then the program takes an input from the user and prints the double until the value of double is not 200 or greater than 200.
  • In the program, there is while loop which checks the value, that it is less than 200 or not. If the value is less the operation is performed otherwise it terminates.
You might be interested in
calculate how many turns of cable you will need on the drum for your cage and skip to move up and down by 500 m​
anyanavicka [17]
Physics. only one, if the drum is 500m around... 50 turns. you will need on the drum for your cage and skip to move up and down by 500m. 500/18.84= 26.5.

Mark me as brainliest pls..... :)
5 0
3 years ago
Read the sentence and answer the question. "Adam Cooper, a cultural strategy officer for the mayor of London, agrees. He thinks
siniylev [52]
<span>I think its pioneers!</span>
8 0
3 years ago
Hi!
baherus [9]

Answer:

Radius = 14 cm = 0.00014 km

Circumference = 2πr = 2 × 22/7 × 14/100000 = 0.00088 km

As it went thousand times , distance covered = 0.00088 × 1000 = 0.88 km

8 0
3 years ago
What is output in computer?​
Goryan [66]

Answer:

An output is data that a computer sends. An input device is something you connect to a computer that sends information into the computer. An output device is something you connect to a computer that has information sent to it.

Output is defined as the act of producing something, the amount of something that is produced or the process in which something is delivered. An example of output is the electricity produced by a power plant. An example of output is producing 1,000 cases of a product.

3 0
3 years ago
A network technician is able to connect the switches between two offices, but the offices cannot communicate with each other, as
Contact [7]

Answer:

C) Router

Explanation:

In computer networking, the router's function is to stand in between diferent data lines and control the flow of data packets.  When a packet arrives from one direction, it reads the address information in the header to determine its direction. Note that the data lines will contain different IP addressing scheme, so considering the scenario in the above question, since the offices use different IP schemes, a router will serve the purpose of directing data packets to allow communication.

6 0
3 years ago
Other questions:
  • Which statement prints "hi" on the screen?
    5·2 answers
  • What is the troubleshooting process?
    5·1 answer
  • The Status bar is used to control the majority of the drafting settings in AutoCAD
    13·1 answer
  • Sandy's keyboard is not inputting data into her computer which key should she press to verify it is connected to her computer...
    11·1 answer
  • What does the phrase at the drop of a hat mean?
    11·2 answers
  • The IntList class contains code for an integer list class. Study it; notice that the only things you can do are: create a list o
    7·1 answer
  • State any three points of importance of local level profession​
    11·1 answer
  • Explain the term creating in word processing​
    12·1 answer
  • Write a recursive, string-valued method, reverse, that accepts a string and returns a new string consisting of the original stri
    15·1 answer
  • question 2 which data link layer protocol defines the process by which lan devices interface with upper network layer protocols?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!