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
erica [24]
3 years ago
10

Given positive integer numinsects, write a while loop that prints that number doubled without reaching 100. follow each number w

ith a space. after the loop, print a newline. ex: if numinsects = 8, print
Computers and Technology
1 answer:
hichkok12 [17]3 years ago
3 0
Hi,

the program is as follows
___________________________________________________________


import java.io.*;
class doubleval

  {
     public static void main()throws IOException   
     {

       DataInputStream dt=new DataInputStream(System.in); 

System.out.println("Enter NUMBER WHOSE DOUBLE U WANT TO                                           PRINT");       
            int n=Integer.parseInt(dt.readLine()); 

                  for(int i=n;i<=100;i=2*i)       
                    {           
                         System.out.println(i);       
                            }   
            }
}


           
You might be interested in
The terminology used to describe a possible path to resolution to a problem from one end to the other is called what?
Ede4ka [16]

The terminology used to describe a possible path to a resolution to a problem from one end to the other is called a solution.

<h3 /><h3>What is terminology?</h3>

The research of these phrases and related applications is known as terminology science. A glossary is a collection of specialist words plus their corresponding interpretations in a given field.

If there is a body or a term which is the need to have a resolution that needs to be made through that the person can evaluate and find a solution for the following situation then that is called a resolution or solution for that particular problem

Learn more about terminology, here:

brainly.com/question/2511894

#SPJ1

6 0
1 year ago
(10 points) 5.12. Discuss how the following pairs of scheduling criteria conflict in certain settings. a. CPU utilization (effic
Novosadov [1.4K]

Answer:

Check the explanation

Explanation:

  1. CPU utilization and response time: CPU utilization is amplified if the overheads that are connected with context switching or alternating are minimized. The context switching outlay can be reduced by performing context switches occasionally. This could on the other hand lead to increasing the response time for processes.
  2. The Average turnaround time and maximum waiting time: Average turnaround time is reduced by implementing the shortest or simple tasks first. Such a scheduling and arrangement strategy could nevertheless starve long-running tasks and in so doing boost their overall waiting time.
  3. I/O device utilization and CPU utilization: CPU utilization is maximized by executing a list of long-running CPU-bound tasks not including the performing context switches. This is maximized by setting up I/O-bound tasks as early as they become ready to run, thus sustaining the overheads of context switches.

3 0
3 years ago
CHALLENGE ACTIVITY 4.2.2: Basic while loop with user input. Write an expression that executes the loop while the user enters a n
tino4ka555 [31]

Answer:

#include<iostream>

using namespace std;

int main()

{

int userNum;

userNum=9;

while(userNum>=0)

{

  cout<<"Body"<<endl;

  cin>>userNum;

}

cout<<"Done"<<endl;

return 0;

}

Explanation:

  • Use the userNum >= 0 expression that executes the loop while the user enters a number greater than or equal to 0.
  • Print the userNum inside the while loop.
3 0
3 years ago
Edhesive assignment 7 calendar
ikadub [295]

Answer:

def leap_year(y):

 if y % 4 == 0:

     return 1

 else:

     return 0

def number_of_days(m,y):

 if m == 2:

     return 28 + leap_year(y)

 elif m == 1 or m == 3 or m == 5 or m == 7 or m == 8 or m ==10 or m == 12:

     return 31

 elif m == 4 or m == 6 or m == 9 or m == 11:

     return 30

def days(m,d):

 if m == 1:

     return 0 + d

 if m == 2:

     return 31 + d

 if m == 3:

     return 59 + d

 if m == 4:

     return 90 + d

 if m == 5:

     return 120 + d

 if m == 6:

     return 151 + d

 if m == 7:

     return 181 + d

 if m == 8:

     return 212 + d

 if m == 9:

     return 243 + d

 if m == 10:

     return 273 + d

 if m == 11:

     return 304 + d

 if m == 12:

     return 334 + d

def days_left(d,m,y):

 if days(m,d) <= 60:

     return 365 - days(m,d) + leap_year(y)

 else:

     return 365 - days(m,d)

print("Please enter a date")

day=int(input("Day: "))

month=int(input("Month: "))

year=int(input("Year: "))

choice=int(input("Menu:\n1) Calculate the number of days in the given month.\n2) Calculate the number of days left in the given year.\n"))

if choice == 1:

 print(number_of_days(month, year))

if choice == 2:

 print(days_left(day,month,year))

Explanation:

Hoped this helped

5 0
3 years ago
This standard library function returns a random floating-point number in the range of 0.0 up to 1.0 (but not including 1.0).
natulia [17]

Answer:

The answer would be A: Random

Explanation:

The random() function returns a generated random number (a pseudorandom number)

5 0
3 years ago
Other questions:
  • The analog signals that carry analog or digital data comprise composites built from combinations of simple sine waves.
    12·1 answer
  • A short-term job or work project that can be paid or unpaid and can lead to a full-time, paying position is called a(n) _____.
    5·2 answers
  • When you want to avoid sending email that a recipient may feel their privacy has been invaded, how would you fill in the (To) bo
    13·1 answer
  • A number of LC-3 instructions have an "evaluate address" step in the instruction cycle, in which a 16-bit address is constructed
    6·1 answer
  • An ____ is a collection of tools, features, and interfaces that enables users to add, update, manage, access, and analyze the co
    10·1 answer
  • Lucy has to move data from column A to column N in a worksheet. Which keys should she select to move data in the same worksheet?
    9·2 answers
  • Apex
    5·2 answers
  • If a student passes off an author’s work as his or her own, the student has
    6·1 answer
  • How did imperialism lead to WWI? A The debate of the morality of imperialism created tensions around Europe b Native people were
    12·1 answer
  • Using C, Write a program that reads a series of strings from standard input and prints only those strings beginning with the let
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!