1 > Instructions Write a program that defines the named constant PI, const double PI =...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1 > Instructions Write a program that defines the named constant PI, const double PI = 3.14159; , which stores the value of TT. The program should use PI and the functions listed in Table 6-1 to accomplish the following: . • Output the value of √π. Prompt the user to input the value of a double variable ≤, which stores the radius of a sphere. The program then outputs the following: o The value of 4.0πr², which is the surface area of the sphere. o The value of (4.0/3.0)πr³, which is the volume of the sphere. g You should format your output like the following example: Surface area of the sphere: 4 * P Volume of the sphere: 4 / 3 * PI Your output must match the wording precisely to earn full credit. Format your output with setprecision (2) to ensure the proper number of decimals for testing! Function abe (x) ceil (x) cos (x) exp (x) fabs (x) floor (x) islower (x) 1supper (x) pow (x, y) sqrt (x) tolower (x) toupper (x) Header File Purpose comaths <math> <math> comath> <coath> <math> cectype> <cctype> <math> <math> <ectype> <cctype> Returns the absolute value of its argument: abe (-7)=7 Returns the smallest whole number that is not less than xcoil (56.34) = 57.0 Returns the cosine of angle x Cos (0.0) = 1.0 Returns e, where e-2.718: exp (1.0) - 2.71828 Returns the absolute value of its argument fabs (-5.67) <= 5.67 Returns the largest whole number that is not greater than x floor (45.67) => 45.00 Returns true ixisa lowercase letter, otherwise it returns false; islower ('h') s true Returns trueixisa uppercase letter, otherwise it returns false; isupper ('K') is true Returns x; if x is negative, y must be a whole number pow (0.16, 0.5) -0.4 Returns the nannegative square root of x, x must be nonnegative aqrt (4.0) <-2.0 Returns the lowercase value of xif x is uppercase; otherwise, returns x Returns the uppercase value of xitx is lowercase; otherwise returns x Parameter(s) Type (double) double double (radians) double double double int double double Result int (double) double double double double double int double double 1 > Instructions Write a program that defines the named constant PI, const double PI = 3.14159; , which stores the value of TT. The program should use PI and the functions listed in Table 6-1 to accomplish the following: . • Output the value of √π. Prompt the user to input the value of a double variable ≤, which stores the radius of a sphere. The program then outputs the following: o The value of 4.0πr², which is the surface area of the sphere. o The value of (4.0/3.0)πr³, which is the volume of the sphere. g You should format your output like the following example: Surface area of the sphere: 4 * P Volume of the sphere: 4 / 3 * PI Your output must match the wording precisely to earn full credit. Format your output with setprecision (2) to ensure the proper number of decimals for testing! Function abe (x) ceil (x) cos (x) exp (x) fabs (x) floor (x) islower (x) 1supper (x) pow (x, y) sqrt (x) tolower (x) toupper (x) Header File Purpose comaths <math> <math> comath> <coath> <math> cectype> <cctype> <math> <math> <ectype> <cctype> Returns the absolute value of its argument: abe (-7)=7 Returns the smallest whole number that is not less than xcoil (56.34) = 57.0 Returns the cosine of angle x Cos (0.0) = 1.0 Returns e, where e-2.718: exp (1.0) - 2.71828 Returns the absolute value of its argument fabs (-5.67) <= 5.67 Returns the largest whole number that is not greater than x floor (45.67) => 45.00 Returns true ixisa lowercase letter, otherwise it returns false; islower ('h') s true Returns trueixisa uppercase letter, otherwise it returns false; isupper ('K') is true Returns x; if x is negative, y must be a whole number pow (0.16, 0.5) -0.4 Returns the nannegative square root of x, x must be nonnegative aqrt (4.0) <-2.0 Returns the lowercase value of xif x is uppercase; otherwise, returns x Returns the uppercase value of xitx is lowercase; otherwise returns x Parameter(s) Type (double) double double (radians) double double double int double double Result int (double) double double double double double int double double
Expert Answer:
Answer rating: 100% (QA)
include include include using namespace std int main declare constan... View the full answer
Related Book For
Microsoft Visual C# An Introduction to Object-Oriented Programming
ISBN: 978-1337102100
7th edition
Authors: Joyce Farrell
Posted Date:
Students also viewed these programming questions
-
Laker Company reported the following January purchases and sales data for its only product. For specific identification, ending inventory consists of 270 units from the January 30 purchase, 5 units...
-
31% of American adults surveyed stated that giving up their phone for a day would be more difficult than giving up their significant other. In 2012, the United States population over the age of 18...
-
During a semester, a class of n=50 students took two exams: a midterm and a final. The mean score for the midterm exam is 80 points with the standard deviation of 6 points. The mean score for the...
-
In Problems 1130, solve each equation by factoring. x 2 + 4x = 0
-
An oil film (n = 1.45) floating on water is illuminated by white light at normal incidence. The film is 280 nm thick. Find (a) The color of the light in the visible spectrum most strongly reflected...
-
Hammer Institute is an accredited college that offers courses almost exclusively on a correspondence basis. Each student pays a tuition fee and receives a set of lesson materials by mail. These...
-
The pie chart at the left shows the responses of a sample of 352 small-business owners who were asked whether their business has a website. Find the mean, the median, and the mode of the data, if...
-
New England Co. predicts that it will use 360,000 gallons of material during the year. The material is expected to cost $5 per gallon. It anticipates that it will cost $72 to place each order. The...
-
Simplify. 3 (4.14)
-
Thaarugo,inc, produces a GPS device that is becoming popular in parts of Scandinavia. When Thaarugo produces one of these, a printed circuit board (PCB) is used and it is populated with several...
-
Use the following two user views for phase 2 of the project. Your task is as follows: 1- Convert each local conceptual design to logical 2- Produce the global logical design The ERDS may contain some...
-
As an operations manager, explore what changes you can bring to Supply Chain Analyze and express through a presentation how effective communications enabled powerful negotiations to succeed Explain...
-
A company believes it can sell 5,500,000 of its proposed new optical mouse at a price of $10.00 each. There will be $8,000,000 in fixed costs associated with the mouse. If the company desires to make...
-
Find the vertical asymptote (if any) of the graph of the function. x - 2x x-16 1. f(x)= 3+x 2. f(x) = 5x-x
-
from the link https://www.digitaltrends.com/computing/best-linux-distros/ Describe which is the best Linux distro and what has been your fastest boot time in Linux?
-
Beretta, Inc. has outstanding 500,000 shares of $13.00 par value common stock. Ruger declares a 7.75% stock dividend at $17.00 per share. What will be the amount recorded to the Retained Earnings...
-
A few publicly listed home appliance manufacturing companies have the following beta, debt, and equity: Company Beta Debt Equity Apple Pear Grape Tomato 1.4 2,500 3,000 1.2 5 1.2 540 0.7 8 * 200 *...
-
Find the intercepts and then graph the line. (a) 2x - 3y = 6 (b) 10 - 5x = 2y
-
If necessary, create a new project named Intermediate26 Project and save it in the Cpp8\Chap13 folder. Also create a new source file named Intermediate26.cpp. Write a program that allows the user to...
-
Carlos receives 24 paychecks each year. Each paycheck, he contributes a specific percentage of his gross pay to his retirement plan at work. His employer also contributes to his retirement plan, but...
-
Which of the following opens the payroll.txt file for output? The file is associated with the outPayroll object. a. outPayroll.open("payroll.txt"); b. outPayroll.open("payroll.txt", ios::out); c....
-
What is the difference between old classical and new classical economics?
-
What is the difference between traditional Keynesian and new Keynesian economics?
-
Why does monetary policy operate with a long and variable lag? Give an example to illustrate your explanation.
Study smarter with the SolutionInn App