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
Write a SELECT statement that returns these three columns: vendor_nameThe vendor_name column from the Vendors table default_acco
Sati [7]

Explanation:

"Select vendor_name as Vendor_Name,

default_account_number as Default_Account_No ,

account_description as Account_Description

From Vendors v, General_Ledger_Accounts ledger

where (add the join condition here)

Order by account_description, vendor_name"

Note: In the above statement, include the alias name appropriately and then execute the query

The "select statement" should contain the list of columns to be displayed

"From statement" should contain the name of the table from which data needs to be fetched.

"Where clause" defines the relationship as well the condition that needs to be executed

"Order by clause" defines the sorting mechanism with the relevant field

5 0
3 years ago
A website whose URL ends with .gov, .edu, or .org is necessarily a reliable source. True or False
natali 33 [55]
True because they are educational anything .com and sometimes .net because .gov is from the government so it is very safe to use and .edu is for education it is always used to help people with education etc and .org is   public which other people can say false and save you from false information
7 0
2 years ago
In cell j6, enter a formula to determine the cost of gas if the customer chose that option as indicated in column i. if the cust
Alex73 [517]

Answer:

a t t i c

Explanation:

7 0
3 years ago
Cynthia finds a spreadsheet on her desk. It has rows and columns of numbers, such as 37, 28, 91, and 12, but Cynthia is not sure
BigorU [14]

Answer:

B

binary numbers

Explanation:

because she does not know what they mean it can be data or information but we are not sure so the best answer is B.

8 0
3 years ago
Read 2 more answers
The opening of the throttle plate can be delayed as long as
blsea [12.9K]
<h2>I'm trying to adjust the sawtooth throttle on my H. I can open the throttle to 8 notches from the top and it is at the 1815 rated rpm. When I go above that it will overspeed, up to 2500rpm! At the last notch on the quadrant. I have tried the adjustments in the governor, the only thing I have been able to do is set the high rpm screw so it stops at the 8th notch from the top. I should be able to have full use of the quadrant and not go over the 1815 rpm, right? Does anyone have a pic of the throttle linkage under the hood and how to adjust it? I've also tried adjusting the rod in the governor between it and the carb, it is tightened all the way up now. Any ideas what I am missing?</h2>
6 0
2 years ago
Other questions:
  • 2- There are many different design parameters that are important to a cache’s overall performance. Below are listed parameters f
    11·1 answer
  • Elena is used to kissing her friends on both cheeks as a form of greeting in her native country. She notices that her new friend
    6·1 answer
  • Five computers are connected to a switch in a star topology. what type of network is this?
    12·1 answer
  • Select the correct answer. Which character type is usually seen more often in games for young children than for the other age gr
    13·1 answer
  • ​For complex models, analysts can choose computer-based modeling tools that use _____, which includes standard shapes and symbol
    10·1 answer
  • Why did latex replace wax?
    7·1 answer
  • Which type of operating system is usually used in personal computers
    13·1 answer
  • Which are advantages of using a server operating system?
    12·1 answer
  • Which of the following sentences use personification 
    9·1 answer
  • You have been trying all day to check your direct messages on social media. The site is really slow to load and sometimes you ca
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!