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
If you give someone ______ to your device, they can control it through another phone or computer.
icang [17]

If you give someone <u>Remote access </u>to your device, they can control it through another phone or computer.

<h3>What is  Remote entry?</h3>

An authorized user can use remote access to connect to a computer or network from a different location using a network connection. Users can connect to the systems they require through remote access even if they are physically far away.

Therefore, the dangers to remote access are:

  • There is a risk of device loss or theft due to a lack of physical security safeguards.
  • as the data is transmitted through a public internet, eavesdropping.
  • unapproved access to systems or data, possibly while oblivious to the screen.
  • If someone gets access to the gadget, they could watch and change the data.

Learn more about Remote access from

brainly.com/question/28900477
#SPJ1

5 0
2 years ago
What is data called that is input into a cryptographic algorithm for the purpose of producing encrypted data?
labwork [276]
<span>A key is data called that is input into a cryptographic algorithm for the purpose of producing encrypted data. There are two types of cryptography, the public key and the private key. The public key uses public keys to encrypt data and private key uses private key to decrypt data. They are produced by a group of algorithms. </span>
8 0
4 years ago
Which one of the following careers is the most highly resistant to economic change?
Eduardwww [97]

Answer:

Video game designers bbbbbbbbbbbbb

8 0
3 years ago
What is the part of a file, the .pptx, or .txt etc called?
Lunna [17]
It is called the file extension or filename extension. It is a suffix that indicates the file format.
7 0
4 years ago
Read 2 more answers
Which osi/iso layer is responsible for determining the best route for data to be transferred?
RSB [31]
TCP/IP, (I believe) layer 3 is the only layer with a concept of networks and routing.
3 0
3 years ago
Other questions:
  • what’s The abbreviation of afk and what does That Mean in gaming playing in Multiplayer online battle arena games
    10·1 answer
  • Select the correct answer.
    5·1 answer
  • What are some of the issues that organizations need to be aware of when designing and managing data?
    8·1 answer
  • In Word, a red wavy underline indicates a/an
    15·1 answer
  • When a person or organization uses the services of another professional, that person or organization is called the _______
    15·1 answer
  • If not cleared out, log files can eventually consume a large amount of data, sometimes filling a drive to its capacity. If the l
    10·2 answers
  • The physical layer of the OSI model is not foundational to any of the other layers. True or False
    8·1 answer
  • If there is an int/integer in a array, and the same int/integer comes at the same spot, does it cancel each other out or does it
    14·1 answer
  • To print photographs in color.​
    7·1 answer
  • O
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!