Calculate the surface area and volume of the sphere

Assignment Help C/C++ Programming
Reference no: EM131025189

Write a function which calculates the surface area and the volume of a sphere. The variables srface area and the volume should be pointer type. Once the radius of the sphere and other necessary variables are passed from the main function, the separate function you wrote should calculate the surface area and volume of the sphere. Finally  the surface area and the sphere should be printed onto the screen. The printing statements

should be done inside the main function.

Hint: surface area of a sphere = 4????2, volume of a sphere =

4

3

????3, also use a similar

approach as in the case of calculating the surface area and the circumference of a disc

given in Pointers lecture slides (slides #23 &24).

Reference no: EM131025189

Questions Cloud

What are the units of the rate constant : What is the average value of the rate constant calculated from the three data sets? What is the rate of disappearance of NO when [NO] = 0.0750 M and [O2] = 0.0100 M?
The excess of cash available over disbursements : Mosbey Inc. is working on its cash budget for June. The budgeted beginning cash balance is $31,000. Budgeted cash receipts total $183,000 and budgeted cash disbursements total $182,000.
How are these examples different from others : Since each pupa of morpho granadensis costs $4.15 and p pupae were received, 4.15p is the cost for the morpho granadensis species. Similarly, 1.50q is the cost of the battus polydamus species. From the third row of the table and the information in..
Functions passed along to susequent generations : Are inherited members and functions passed along to susequent generations? If Dog derives from Mammal, and Mammal derives from Animal, does Dog inherit Animal's functions and data?
Calculate the surface area and volume of the sphere : Calculate the surface area and volume of the sphere. Finally  the surface area and the sphere should be printed onto the screen. The printing statements
What will happen to the level of consumption : If there is a reduction in taxes, what will happen to the level of consumption and the level of saving in this economy, according to this model? Explain your answer
Show that a^-1 has all integer entries : Conversely, suppose A and A^-1 are both matrices with integer entries. Prove that D(A_1, A_2) = +/- 1.
Which of the following parameter passing mechanism : Which of the following parameter passing mechanism is/are supported by C++ but not in C? [A] Pass by value [B] Pass by reference
Write a class called adder that stores the sum : Write a class called  Adder that stores the sum of all the  ints given to it. Your  Adder class should allow you to write the following code (and code like it):

Reviews

Write a Review

C/C++ Programming Questions & Answers

  What is the command that you would use to compile the code

Describe the behavior when you compile the program, with no options. What is the command that you would use to compile the code and create the executable "power2"?

  Undirected graph has scanning tree

undirected graph has scanning trees. The minimal scanning tree is the scanning tree with the minimal sum of weights on edges. The minimal scanning tree can be found by using Prim's algorithm

  Write an abstract data type

Write an abstract data type in C++ or Java (find which language you used) for rational numbers (a numerator and a denominator, both in integers).

  Give brief definition of the database concept

First let us start with a brief definition of the Database concept. A database is a collection of data records stored in a computer in a systematic way. In this way, a computer program can be used to answer queries about the data stored in the dat..

  Write a program for a college''s admissions office

Write a program for a college's admissions office. Create variables that store a numeric high school grade point average andan admission test score.Print the message "Accept" if the studenthas any of the following:

  Write a c function to convert gallons-quarts-pints and cups

Write a C function named liquid() that is to accept an integer number and the addresses of the variables gallons, quarts, pints, and cups.

  Compute overall scale factors by raising the scale factor

Finally it needs functions to return whether an animation is in progress and one to return the current step of the animation. Those functions will need to be called by the Transformation class and the Scaling class must must be modified so the the ..

  Write a function that computes length of a character string

Write a function that computes the length of a character string (i.e. write your own implementation of the strlen function.

  What program design tools are available

What program design tools are available? Discuss in details by studying at least three program design tools and how they can help in better program design and C code?

  Create author-filename

FILENAME: title of the source file,SPECIFICATION: description of the program

  What problem arises as the lengths of the time slices

What problem arises as the lengths of the time slices in a multiprogramming system are made shorter and shorter?

  Create class has three pieces of information as data members

Create a class called Date in C++ that includes three pieces of information as data members: month (type int), day (type int) and yaer (type int).

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd