Question: follow guidelines to write code number 2 In general, use lower case letters for variable names. Variable names should be mnemonic. Separate multiple words in

follow guidelines to write code number 2  follow guidelines to write code number 2 In general, use lower
case letters for variable names. Variable names should be mnemonic. Separate multiple

In general, use lower case letters for variable names. Variable names should be mnemonic. Separate multiple words in a variable name with an underscore or begin the second word with an uppercase letter. Indent 2-4 spaces (optimally 3) within main. The editor should take care of proper indenting, Place no more than one C statement per line. Since we have not studied the math library yet, use multiplication (x*x or x*x*x) to square or cube a value. 2. Write a program that prompts the user to input a radius in centimeters and calculates and then prints the area of a circle, volume of a sphere, and surface area of a sphere with that radius. Define PI as a defined constant using a preprocessor command with a value of 3.14159265 or declare pi as a constant variable. Use data type double for all variables. Using a complete sentence, print the circle area as a decimal with 2 digits following the decimal point. Include units. Using a complete sentence, print the volume of the sphere in exponential format with 4 digits following the decimal point when written in exponential notation. (Use the formula V Beware of truncating the fraction 4/3.) Include units. 3.0 Again using a complete sentence, output the surface area of the sphere in g format with 5 significant digits. Include units

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!