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
disa [49]
3 years ago
12

Write a while loop that prints that number doubled without reaching 100. Follow each number with a space. After the loop, print

a newline. Ex: If num Insects = 8, print: 8 16 32 64
Computers and Technology
1 answer:
elena55 [62]3 years ago
4 0

Answer:

The program to this question as follows:

Program:

#include <iostream> //defining header file

using namespace std;

int main() //defining main method

{

int n; //defining integer variables

cout<<"Enter number: "; //message

cin>>n; //input value by user

while (n< 100) //loop for check condition

{

cout<<n<<" ";//print value

n=n*2; //calculate value

}

return 0;

}

Output:

Enter number: 8

8 16 32 64  

Explanation:

In the above C++ language code, a header file is included, then defining the main method, inside the method an integer variable n is defined, which is used for user input for calculating their double number.  

In the next step, The while loop is declared, and the loop variable n range is defined, that its value is less than 100, inside the loop the variable n is used to calculate, its double number, and print function "cout" to print its value.

You might be interested in
(Java) Write a program that accepts a number of minutes and converts it both to hours and days. For example, 6000 minutes is 100
iogann1982 [59]
Import java.util.Scanner;
public class MinutesConversion {
private static Scanner inputDevice;
public static void main(String[] args) {
int minutes, hours;
float days; // float for decimal point

inputDevice = new Scanner(System.in);
System.out.println("Please enter minutes for conversion >> ");
minutes = inputDevice.nextInt();
hours = minutes / 60;
days = hours / 24.0f;


System.out.println(+ minutes + " minutes is " + hours + " hour(s) or" + days " days");
}
}
6 0
3 years ago
Jacinta registered herself on a social-networking site. She receives one or two emails every day about promotional offers as wel
Rainbow [258]
It would be Spam. . . . 

3 0
4 years ago
clinical outcomes and survival differences between primary, secondary and concomitants carcinoma in situ of urinary bladder trea
8_murik_8 [283]

The summary of the research - clinical outcomes and survival differences between primary, secondary and concomitants carcinoma in situ of urinary bladder treated with BCG Immunotherapy is given below.

<h3>What is the summary of the above research?</h3>

Urinary bladder carcinoma in situ (CIS) is a flat, high-grade, and aggressive form of urothelial cancer with a high likelihood of development to muscle-invasive illness and metastatic dissemination.

The study's goal was to compare the clinical histories and survival rates of primary, secondary, and concurrent CIS of the bladder.

Learn more about Immunotherapy at brainly.com/question/14493516

#SPJ1

6 0
1 year ago
Read 2 more answers
Scroll bars show groupings of word-processing tasks that can be performed User: The _____ button will remove the last change tha
romanna [79]
<span>The Undo button will remove the last change that was made to a document. </span>
8 0
4 years ago
Read 2 more answers
15. The legal right to control the
Iteru [2.4K]
The correct answer copyright
4 0
3 years ago
Read 2 more answers
Other questions:
  • Create a "web page" with the following components: An input field for the "number of rounds to play" The "number of remaining" r
    14·1 answer
  • In what order are ribbons organized? From Microsoft Word
    7·1 answer
  • True false) cad means computer aided manufacturing​
    10·1 answer
  • How do you italicise, bold, letters on this app?​
    11·2 answers
  • Assume that Precinct Report is a structured type with these fields,address (a string),and three int fields which are counts of c
    12·1 answer
  • Select the correct answer. Which of these statements is an explorer most likely to make?​
    6·1 answer
  • Function of C:\&gt;DIR*.doc/p​
    5·1 answer
  • Which describes the first step a crawler-based search engine uses to find information?
    14·2 answers
  • Luis saves an attachment that he received from Kevin. Where will the attachment save by default?
    5·1 answer
  • Blockchain is often associated with Bitcoin and the financial services industry. However, it is applicable to almost every indus
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!