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

  Sales representative and sales amount

Write a project in visual basic to design a suitable form to allow the uses to enter name of sales representative and sales amount and then calculate and display commission. Commission is 7% of sales amount if sales amount exceed Ringgits 60000 ot..

  Loops and nested loops

Loops and Nested Loops- Suggest one (1) example of a problematic programming situation or scenario that nested loops could at least partially resolve. Justify your response

  Differences of absorption and variable costing

Discuss the advantages and disadvantages of absorption and marginal costing and what factors organisations are required to consider when using each of these methods

  Write a program for a graphics system

Write a program for a graphics system that has classes for rectangles, squares, circles and triangles. Each of these must be derived from a base class

  Performance of disk memory system

Suppose a regional computer centre A wants to evaluate the performance of its disk memory system. One measure of performance is the average time between failures of its disk drive. To estimate this value, the centre recorded the time between failu..

  Implement a program to process a weighted undirected graph

Read in the number of vertices V and the number of edges E of the graph followed by its E edges, each in the form u, v, w where 1 0 representing an edge uv with weight w.

  What is the bug or logic error in the above program

What is the bug or logic error in the above program. Add the lines to fix it. This is an example of __nested__________ loops. How many times does the outer loop execute

  Program to declare a simple one-dimensional array

Write a simple program, in C, C++, and Java, to declare a simple one-dimensional array and then attempt to access an array element that is not within its bounds.

  Write a program to read only one integer number

Write a program to read ONLY one integer number (your input must be one 3 digit number from 100 to 999), and to think of a number as being ABC (where A, B, and C are the 3 digits of a number)

  Creates a bus class

write a program that creates a bus class. create a constructor that initializes the number of passengers and number of seats. declare four objects. use the default copy constructor to initialize two of the objects.

  Write c++ program that reads in the average monthly rainfall

Write a C++ program that reads in the average monthly rainfall for a city for each month of the year and then reads in the actual monthly rainfall for each of the previous 12 months

  Program that asks the user to enter the monthly costs

write a program that asks the user to enter the monthly costs for the following expenses incurred from operating his or her automobile:

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