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
Write a python program to print the following series 3..10..31..94......n​<br><br>Pls answer fast..
butalik [34]

I've included my code in the picture below. Best of luck

8 0
2 years ago
If a document reaches you, and requires you to perform some action, you should do it immediately if ________.
ankoles [38]
<span>You should do it if C. it will take less than two minutes to complete </span>
6 0
3 years ago
Read 2 more answers
Write the declaration statement for a two-dimensional array X of integers with five rows and five columns that accepts 25 intege
madreJ [45]

Answer:

int[ ][ ] X = new int[5][5];

It can also be declared and initialized this way:

  int[][] X = {

               {1,2,3,6,8},

               {4, 5, 6, 9},

               {7,5,6,8,9},

               {8,5,8,8,9},

               {10,2,6,8,11},

       };

Explanation:

Above is a declaration of a two-dimensional array that can hold 5*5=25 int values. A java program is given below:

public class JavaTwoD{

   public static void main(String args[ ]) {

       // creating the 5X5 array

       int[ ][ ] X = new int[5][5];

       // looping through the array to add elements

       for (int i = 0; i < X.length; i++) {

           for (int j = 0; j < X[i].length; j++) {

               X[i][j] = i * j;

           }

       }

5 0
3 years ago
How do you give <br>brainlieset ​
Ray Of Light [21]

It has to be two people answering.Then vote braniest to who's answer you think is better.

8 0
3 years ago
What are the components of a computer system
Snezhnost [94]

Answer:

The motherboard

Explanation:

3 0
2 years ago
Other questions:
  • The concept that allows certain professions to use copyrighted material without permission in their work is called _____.
    14·1 answer
  • What is the name of a computer or application program that intercepts user requests from the internal secure network and then pr
    11·1 answer
  • In an ha configuration, which two failure detection methods rely on icmp ping? (choose two.)
    12·1 answer
  • Name two purposes of creating a microsoft account for use in visual studio 2015
    12·1 answer
  • Which of the following actions would help people determine their interests?
    11·1 answer
  • Which component of the windows desktop allows you to retrieve files that have recently been deleted?
    11·1 answer
  • Is ryan patrick cullen gay
    7·2 answers
  • What happens to a message when it is deleted?
    5·2 answers
  • Re:
    15·1 answer
  • Which of the following is not the disadvantage of closed
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!