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
Mandarinka [93]
3 years ago
8

Write a C++ program to accept a bunch of numbers from the user. Accept the numbers in a loop and stop when the user enters 0. Pr

int the cube of the numbers as they come in. You can use the math library. You don’t have to account for floating point precision. Sample Run: Enter the numbers(0 to stop):12 The cube is 1728 -8 The cube is -512 3.93 The cube is 60.70 -22.5 The cube is -11390.63 0
Computers and Technology
1 answer:
brilliants [131]3 years ago
7 0

Answer:

#include <iostream>

using namespace std;

int main() {

   float n;//declaring a float variable.

   cout<<"Enter 0 to stop"<<endl;//printing the message.

   cin>>n;//prompting n.

   while(n!=0)//taking input until n is not 0.

   {

       cout<<"The cube is "<<n*n*n<<endl;//printing the cube.

       cin>>n;

   }

return 0;

}

Input:-

12

-8

3.93

-22.5

0

Output:-

Enter 0 to stop

The cube is 1728

The cube is -512

The cube is 60.6985

The cube is -11390.6

Explanation:

I have declared a float variable n.I am prompting n from the user and letting the user know that he has to enter 0 to stop until the user shall type inputs.In the loop I am simultaneously printing the cubes of the numbers entered.

You might be interested in
A ____ is a copy that is kept in case values need to be restored to their original state.
Zepler [3.9K]
A backup is the copy made in this case
5 0
4 years ago
Write the name of the tab, the command group, and the icon that you need to use to justify
Dafna11 [192]

Answer:

Tab: Home Tab

Command Group: Paragraph

Icon: Justify Icon

<em>The icon has no name; rather it is represented by 4 horizontal lines that are aligned on both edges</em>

<em />

Explanation:

To answer this question, I'll make use of the following attachment

<em>Where</em>

<em>1- represents the home tab</em>

<em>2 - represents the paragraph</em>

<em>3 - represents the justify icon</em>

<em />

3 0
4 years ago
What consist(s) of a series of related instructions that tells the computer what to do and how to do it
Ber [7]

Answer:

Software program.

Explanation:

Unlike hardware which describes physical entities of a computer, a software program or simply a program (or even simply, a software) is a set of instructions or data that commands the computer on specific tasks to be performed and how they (the tasks) are performed.  Examples of a software are internet browser applications such as Google Chrome, Internet Explorer, and Mozilla Firefox and graphics applications such as Photoshop and Corel Draw.

Hope this helps!

8 0
4 years ago
To keep a desktop computer or a server powered up when the electricity goes off in addition to protection against power fluctuat
pickupchik [31]

To keep a desktop computer or a server powered up when the electricity goes off in addition to protection against power fluctuations, an <u>uninterruptible power supply (UPS)</u>, which contains a built-in battery, can be used.

<u>Explanation</u>:

An uninterruptible power supply (UPS) is a device that allows a computer or server powered up for a short time, when the electricity goes off. UPS device also provides uninterrupted service during power fluctuation.

A battery is inbuilt in the UPS and provides power for few minutes to the computer to shut down it in a proper manner.

UPS is available at affordable cost and can be maintained at low cost compared to generators.

8 0
3 years ago
Read 2 more answers
Match the terms with their definitions.
Sever21 [200]
Phishing is 2
clickjack is 1
malware is 3
single signon is 4

Internet safety tip: Single Sign-On is unsafe. The others are made by hackers with no life and no heart.

5 0
4 years ago
Read 2 more answers
Other questions:
  • Which step of the machine cycle examines the op-code of the next instruction to be executed?
    12·2 answers
  • A short-circuit evaluation is where each part of an expression is evaluated only as far as necessary to determine whether the en
    14·1 answer
  • Java
    13·1 answer
  • Who invented the first RAM stick
    11·1 answer
  • It is possible to collaborate on a presentation with a group of people using the Internet.
    14·1 answer
  • one data is in memory the computer interpets and executeinstructions to process the data into informationA. TrueB. False
    8·1 answer
  • True or false. The CPU requires it's own power from the power supply, and can't receive power from the motherboard.
    9·1 answer
  • Which mechanical switches are the loudest and clickiest?
    15·1 answer
  • 6. A genre of video game in which a player chooses a character and builds, upskills and modifies that character is referred to a
    12·2 answers
  • Which programming paradigm focuses on abstraction to the level of math and the elimination of side-effects and state based progr
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!