Calculate and display the volume of a cylinder

Assignment Help Electrical Engineering
Reference no: EM13263828

Write a complete program for Visual C++ to calculate and display the volume of a cylinder, given its radius and height. Your program must meet the following requirements:
· Your program should prompt the user to input the radius and height. The program should output the result with three digits after the decimal point. The output should include some explanatory text.
· Make the value of PI (3.14159) a constant in your program.
· The volume formula is PI * radius2 * height.
· Valid input is any real number greater than 0 for the radius and height of the cylinder. Your program should consider a negative input as an error and output an error statement. Do not do any calculations in this case.
· Make sure you use the appropriate data types for everything.

Reference no: EM13263828

Questions Cloud

The sample mean is 2.59. conduct the following test of hyp : A sample of 65 observations is selected from one population with a population standard deviation of 0.75. The sample mean is 2.67.
Write general form of natural response for capacitor voltage : Consider a source-free parallel RLC circuit having alpha =10^8 s^-1, omega-sub-zero = 10^3 rad/s, and omega-sub-zero * L = 5 ohm. a) Show that the stated units of omega-sub-zero * L are correct. b) Compute s_1and s_2.
What is sorenson expected stock price : Sorenson Corp.'s expected year-end dividend is D = $4.00, its required return is r = 11.00%, its dividend yield is 6.00%, and its growth rate is expected to be constant in the future. What is Sorenson's expected stock price in 7 years, i.e., what ..
Calculate the mass of neptune : The planet Neptune has a satellite, Proteus, which travels in an orbit 1.180*10^8 m with a period of 1.12 days. Calculate the mass of Neptune
Calculate and display the volume of a cylinder : Your program should prompt the user to input the radius and height. The program should output the result with three digits after the decimal point. The output should include some explanatory text.
What was the rate of return on the funds : Your grandmother put $35,000 aside for you 13 years ago. Today, the account is worth $76,432.16. Assuming the money was invested with a daily compounding, what was the rate of return on the funds your grandmother saved?
What is the return on equity : High Mountain Foods has an equity multiplier of 1.55, an asset utilization rate of 1.1', and a profit margin of 7.5%. What is the return on equity?
Which is the effective annual rate : Your auto finance company is quoting you an Annual Percentage Rate (APR) of 8%. You are borrowing $45,000 and the payment is $845 per month. You will make monthly payments. Which is the Effective Annual Rate (EAR)?
Calculate the npv of each choice : The opportunity cost of capital is 10.3 percent. Calculate the NPV of each choice and suggest when should Predator sell the company?

Reviews

Write a Review

Electrical Engineering Questions & Answers

  Lithium ion battery technology

The paper includes Lithium ion battery technology with its advantages and disadvantages. The paper discusses about the Lithium air battery in which detailed reactions of Lithium with air including nonaqueous as well as aqueous are given.

  Power transformers and tariffs

Construction of different types of power transformer, significant energy savings

  Paper on orthogonal frequency-division multiplexing

This document is shown a paper on Orthogonal frequency-division multiplexing with advantages, disadvantages and uses.

  Function of the hmi in a scada system

This assignment contains electronics engineering questions like State the commonly found components of a SCADA (Supervisory control and data acquisition) system. and decribe the function of the HMI in a SCADA system.

  Resultant waveform of the odd harmonic series

Prepare an Excel graph showing the individual components and summated resultant waveform of the odd harmonic series resulting in an approximate square wave.

  Explain scada system

Explain the function of the HMI in a SCADA system.

  Design a 2-digit 24 second shot-clock

Design a 2-digit 24 second "shot-clock" countdown timer with pushbutton controller.

  Model a discrete-time system

To understand di erent signal models To be able to model a discrete-time system and design simple signal processing algorithms.

  Draw a relay construction diagram

Draw a relay construction diagram and briefly explain the operation of a relay.

  Frequency division multiplexing

Write a short technical report on Frequency Division Multiplexing

  Impact of electron energy

Briefly discuss the impact of electron energy, electron current and target on the Bremsstrahlung generated.

  Traffic light controller

The schematic of the traffic light controller

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