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]
4 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]4 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
Who made the first sandwich?
RoseWind [281]
That guy made it. john m the 4th

7 0
3 years ago
Read 2 more answers
Which ribbon tab is not a default in Outlook 2016's main interface?
IRISSAK [1]

Answer:

view

Explanation:

i just know it

8 0
3 years ago
Read 2 more answers
In creating a professional action plan it's important to
blagie [28]
Whenever creating a professional action plan, it might be easier to do an "if...then..." plan, or just a daily plan, like this:

Monday:
Kitchen:
 Do dishes
 Sweep floor
 Wipe counters

Bedroom:
 do laundry etc,
5 0
3 years ago
A digital certificate system: Group of answer choices uses digital signatures to validate a user's identity. is used primarily b
kompoz [17]

Answer:

uses third party CAs to validate a user's identity

Explanation:

The Digital Certificate is the only means that technically and legally guarantees the identity of a person on the Internet. This is an essential requirement for institutions to offer secure services over the Internet. Further:

The digital certificate allows the electronic signature of documents The recipient of a signed document can be sure that it is the original and has not been tampered with and the author of the electronic signature cannot deny the authorship of this signature.

The digital certificate allows encryption of communications. Only the recipient of the information will be able to access its content.

4 0
3 years ago
Therapeutic services pays less than most other careers.<br><br><br> 1) True<br> 2) False
horrorfan [7]

This is false. Therapeutic services are some of the most expensive.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Judy forgot where she saved a certain file on her computer. Therefore, she searches for all files with a .jpg file extension. Wh
    10·2 answers
  • A user reports his or her computer is slow to boot. You check the boot order and determine that the computer is checking the C d
    12·1 answer
  • An IT company revises its process parameters in response to complaints from vendors that products were not ready on time. This w
    15·1 answer
  • ____ is the most widely used language for writing system software because it combines the power of a high-level language with th
    12·1 answer
  • Assume that a 5 element array of type string named boroughs has been declared and initialized. Write the code necessary to switc
    5·1 answer
  • It’s Saturday and you’re looking forward to hanging out with friends and having some fun. However, you get two phone calls early
    10·1 answer
  • Please help. will give u brainliest!! khan academy computers and the internet!!
    12·1 answer
  • List out any four hardware and software components required for multimedia​
    10·1 answer
  • Debugging 2.17.3: Debug: The Two Towers Code Hs
    15·1 answer
  • What is one of the limitations of marketing in social media?.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!