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]
2 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]2 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
Please answer this question​
Andrews [41]
Can you please upload it again
7 0
2 years ago
What computer company was founded in 1975?
erica [24]
Microsoft company was founded in 1975
6 0
3 years ago
Consider a hypothetical microprocessor generating 16-bit addresses with 16-bit data accesses (i.e. each access retrieves 16 bits
Vlad [161]
A. number of addresses is 65536
b. memory capacity is 128 kbytes or 131072 bytes
c. The last memory address is FFFF which is 65535

8 0
3 years ago
Your help desk has informed you that they received an urgent call from the vice president last night requesting his logon ID and
makkiz [27]

Answer:

Social Engineering Attack

Explanation:

The exploitation of individuals in order to gain confedential information is a Social Engineering Attack. These attacks typically take advanage of one's emotions or they use inpersonaltion to steal data.

read more here: https://www.webroot.com/us/en/resources/tips-articles/what-is-social-engineering

Lmk if this helps! :)

7 0
3 years ago
Do individuals have a privacy interest in their smartphones' locations?
Rzqust [24]

Answer:

In today's world, everyone using smartphones as it easily allow to communicate by using different types of features like texting, video, e-mail and by using internet we can run various types of applications.

Smartphones carries one of the main and important skills that is show our current location. By using various types of applications like Global positioning system (GPS), cell ID and wifi we can easily trace the location.

But there is different types of option according to the individual requirement as some people want privacy as they are not interested to share their location to anyone.

6 0
3 years ago
Other questions:
  • Consider the following classes:
    8·1 answer
  • 10 facts about turbines
    11·2 answers
  • What is the time period of 1st generation of computer ???
    11·1 answer
  • Create a program that reads words.txt (link near top of our home page) in order to: determine the length of the longest word(s)
    14·1 answer
  • Through the use of a _____ system, information on prospective, current, and past customers is stored and analyzed for future pla
    15·1 answer
  • What happens if the addressed device does not respond due to a malfunction during a read operation?
    11·1 answer
  • HURRY!!!!!!!!!!!!!
    15·1 answer
  • Plz answer this....quickkkkk​
    7·2 answers
  • What is the effects of computer and internet attacks​
    11·2 answers
  • The following pieces are known as (image shown above)
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!