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
Microsoft PowerPoint is an example of a(n) _____ application.
Daniel [21]

Answer: i'd say utility

Explanation:

3 0
3 years ago
Read 2 more answers
You can send emails to individuals from your address book.<br><br> True<br> False
MAXImum [283]
I believe the answer is False or I may be wrong
5 0
3 years ago
A (n) _______________ is a dot or other symbol positioned at the beginning of a paragraph
larisa86 [58]

Answer:

Bullet

Explanation:

I've written a paragraph before. I should know!

3 0
3 years ago
Read 2 more answers
A series of drawn pictures (like a comic) of key visual shots of planned production for video is a/an
Ne4ueva [31]

Answer:

The correct answer is <u>D) Storyboard</u>

Explanation:

A storyboard is used during the initial planning stage of filmmaking. You draw pictures to demonstrate the general idea of what shots you want to get before actually going out and filming on a set/studio.

4 0
2 years ago
Which method(s) must a serializable class, implement?
Cloud [144]

Answer: None of the given option is correct

Explanation:

A serializable class is implemented, when an object is serializable interface. If you want to serialize one of your classes, then the class must implemented in the Serializable interface. To implement the serializable interface, convert a class into the series of bytes and when serializable object might reference your class. Serializable classes are useful when you wanted to persist cases of the class or send them over wire.

5 0
3 years ago
Other questions:
  • Use a colon before a list and put one space after a colon. True False
    15·2 answers
  • What is a function library?
    11·1 answer
  • Binary is best interpreted by a computer because?
    8·2 answers
  • One horsepower is equal to how many foot-pounds of work per second?
    10·2 answers
  • 1. Explain the difference between a web browser and a search engine. (2 points)
    8·1 answer
  • What enables image processing, speech recognition, and complex game play in Artificial Intelligence (AI)?
    7·1 answer
  • What are the main dimensions of information system and their components
    13·1 answer
  • How can we avoid falling victim to a phishing or pharming scheme
    14·1 answer
  • In what ways can information be slanted in a news report?
    9·1 answer
  • Which instruction is used to convert an integer value to float and push it onto the fpu stack?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!