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
oksano4ka [1.4K]
3 years ago
10

.) Write a complete C program in one file which takes a double value from the user, cubes it, and prints the result. Your progra

m must use a function which takes a parameter for the value to be cubed and returns the result by value. The function may not print anything or read anything directly from the user (i.e. no cin/cout in the function). Hint: n cubed is defined as n*n*n. Upload as cubeValue.cpp.
Computers and Technology
1 answer:
Ket [755]3 years ago
8 0

Answer:

Explanation:

#include <iostream>

using namespace std;

double cube(double);

int main()

{

   double ci=0;

   cout << "Enter avalue :";

   cin >> ci;

   cout << "Cube of " << ci << "is =" << cube(ci) << endl;

   return 0;

}

double cube(double i)

{

   return(i*i*i);

}

You might be interested in
What is likely to happen to the economy when there’s too much money or credit circulating?
Svetlanka [38]
It depends on HOW much money is circulating. If governments just print money with nothing to back it, hyperinflation occurs. If there's a bit too much money and credit, inflation happens. Generally, 3% inflation is considered normal and a healthy amount by economists.
5 0
3 years ago
Mary needs to choose the menu in order to place the text in a desired fashion around the image.
n200080 [17]
Can you be more specific?

7 0
3 years ago
Read 2 more answers
How to make a water bottle rocket??
k0ka [10]
This question should be in physics so this is my answer in C&T format-go to a online shop and order one or the pieces then follow the instructions that will be given.
6 0
3 years ago
What type of virus was the "lloveyou" virus?<br> 1.Trojan<br> 2.Worm
Paul [167]

Answer:

2. Worm

Explanation:

8 0
3 years ago
Read 2 more answers
PLEASE HELP ILL GIVE POINTD AND BRAINLIEST
Nastasia [14]

Answer:

I would have to say C.

Explanation:

Feel free to correct me if i'm wrong :)

Hope this helps

4 0
3 years ago
Other questions:
  • A circuit has a resistance of 300 ohm and a current of 0.024 A. What is the voltage in the circuit?
    12·1 answer
  • Is it okay to leave your car running while parked?
    15·1 answer
  • 350 square feet requires 1 gallon of paint. Assign gallons_paint with the amount of paint required for wall_area. Sample output
    12·1 answer
  • N, or central processing unit, is also known as the
    10·2 answers
  • CAD workstations
    11·1 answer
  • How to print wireless from laptop to samsung printer?
    6·2 answers
  • 8.7 Code Practice: Question 2 edhesive
    14·2 answers
  • Dragging a mouse over text is called
    9·1 answer
  • Please define processor​
    14·1 answer
  • What does Amara hope will<br> happen when Dad sits on the sofa?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!