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
Which part of the computer contains logic circuity which interrupts instructions from a program​
poizon [28]

Answer:

The control unit of the CPU contains circuitry that uses electrical signals to direct the entire computer system to carry out stored program instructions.

Explanation: The control unit does not execute program instructions rather, it directs other parts of the system to do so.

6 0
3 years ago
Filtering is a function of _____.
Levart [38]
The answer is: switches.

Explanation:

Filtering is a function of switches.
3 0
2 years ago
Which of these consoles have 64 bit architecture
tigry1 [53]

I don't know if this is on your list, but I know for a fact that the Nintendo 64 system (or N64) has a 64-bit architecture.

8 0
3 years ago
What are the disadvantages of a server-based network? -lack of centralized network security - need for a network administrator -
tigry1 [53]

Answer:

The server-based network has some disadvantages such as hardware-accelerated which is affordable. Effective operating system with a network. Requires a dedicated system administrator.

Explanation:

  • When one of the databases drops south all the people are being affected and the whole network can even be downgraded.
  • Costlier to set up and maintain.
  • Expensive: - The expensive server hardware equipment, database software platforms, and network installation can require significant source host and system administrator.
  • Administrating:-  Appears to require continual servicing by the system administrator and admin must behave with the relevant skills to preserve also that network infrastructure tracking is an important requirement.
  • Server Failure: - The complete functionality of the system is hosting events. If the server crashes, the whole system will go away even though all the customers rely solely on the computer.
  • Heavy Traffic:- The server is the infrastructure for managing entire elements of the organization that offer the server overload. Internet traffic will be even more relevant as the customer must start their contact session from boot time to disconnect. System routing must be properly maintained otherwise it tends to lead this same computer as a crowded state or the standard processes will be affected.
5 0
3 years ago
   In the Start menu of Windows 7, you see your name listed as an option. Where does this shortcut lead if you select it?
ss7ja [257]
I do believe the answer is c. I used to own a computer with a windows 7 program.

5 0
3 years ago
Other questions:
  • By changing the field size for text to the maximum number necessary,
    6·1 answer
  • What does DKIM stand for?
    9·2 answers
  • What is the main characteristic of a Peer-to-Peer (P2P) network?
    8·1 answer
  • 1. Consider a direct-mapped cache that can accommodate 8Mbytes from a main memory, that uses a 32-bit address and 32-byte blocks
    5·1 answer
  • Which of the following terms best describes the security domain that relates to how data is classified and valued?
    14·1 answer
  • Your search google for recipe for tonight dinner is an.example of ?​
    8·2 answers
  • 1. Which sentence best expresses the main idea
    12·1 answer
  • Hello can you please help with this if you want to thank you!
    15·2 answers
  • What is the best wi-fi name you have ever seen?
    10·1 answer
  • WAp to input the radius and print<br> the area of circle
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!