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
A common hardware component found in electronic devices including desktop computers, laptops, tablets and smartphones. The amoun
Maurinko [17]

Answer:

A. RAM

Explanation:

RAM (Random Access Memory) is the hardware in a computing device where the operating system (OS), application programs and data in current use are kept so they can be quickly reached by the device's processor.

8 0
3 years ago
What menu allows you to look up a command and learn how to use it?
e-lub [12.9K]
The answer is help because it helps you<span />
5 0
3 years ago
A smartphone user notices that their phone gets very hot, and their battery is draining quickly. Even when the phone is in their
nika2105 [10]

Answer:

The problem would be the battery

Explanation:

The reason is becuse the battery might be bad or have a shortage in it hope this helps :) and good luck!

6 0
2 years ago
5. The problem domain refers to the
solong [7]

Answer:

The problem domain refers to the support options.

6 0
3 years ago
Whereas lines of competition are clearly defined in the more established industries, in the Internet industry they are blurred a
Zarrin [17]

Answer:

Whereas lines of competition are clearly defined in the more established industries, in the Internet industry they are blurred and indistinct, as companies that compete one day may be partners the next. So "Lines" cannot be compared to/with internet companies.

Explanation:

The Internet Industry  is shaped by its unique framework outlining and its own rules between the companies within it, which offer a vast number of products and services and not always competing with each other compared with the traditional established industries competition lines that were developed from two parties or more aiming the same unshareable goal. These industries are stablishing the lines of competitions predicament which by all means can not be measured and applied using the same criteria for both of them.

The online industry is claiming for flexible, pliant lines of competition to be inforced to its specific logic and mechanisms.

The companies are now in a brand new competing ground with the digital area, so traditional established bart lines of competition although clear and defined are becoming obsolete facing the current surprising thus blurred and indistict internet industry lines.

6 0
3 years ago
Other questions:
  • Which statement describes the word "iterative"?
    9·1 answer
  • What are six external parts of a computer
    11·1 answer
  • What concerns do you need to have with individuals hacking your information, computer, personal devices, and car? How can you pr
    5·1 answer
  • Which of the following scenarios can best be addressed by operations management?
    11·1 answer
  • What cannot be performed using windows task manager
    10·1 answer
  • How do you calculate typing speed
    8·1 answer
  • Jon wants to assign a value to the favorite food variable: favoriteFood! = "Pizza" but gets an error message. What does he need
    9·2 answers
  • Write a C function named apply_all that expects two arrays of integers and their sizes and dynamically allocates a new array of
    7·1 answer
  • What are some other possible causes of an overheating laptop
    7·1 answer
  • Who is katie and why is she deleting my answers
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!