How to make the value of pi a constant in the program

Assignment Help Electrical Engineering
Reference no: EM13281322

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: EM13281322

Questions Cloud

Find the company weighted average cost of capital : The company's cost of capital is the cost of debt is 4.61, the cost of common equity is 5.23, and cost of preferred equity is 6.67. What is the company's weighted average cost of capital?
Compare and contrast 3g wireless networks to 4g networks : Compare and contrast 3G wireless networks to 4G networks in terms of Services and applications, Network architecture, Data throughput and user perceptions
Determine the primary and secondary turns of transformer : A 2400-115V transformer has a sinusodial flux expressed by φ=0.113 sin 188.5t. determine the primary and secondary turns.
Find the option price using a replicating portfolio : We have a call option c with maturities 3,0,0,0 (respective to the stock maturities) with a .25 probability. How do we find the option price using a replicating portfolio?
How to make the value of pi a constant in the program : 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.
Explain importance of using structured innovation process : Explain the importance of using a structured innovation process in your organization to enable innovation.
Find the orbital speed of the second satellite : A satellite is in a circular orbit around an unknown planet. The satellite has a speed of 1.19 x 104 m/s, What is the orbital speed of the second satellite
Define kc for the reaction if the equilibrium concentrations : Determine the value of Kc for the following reaction if the equilibrium concentrations are as follows: [PCl5]eq = 0.56 M, [PCl3]eq = 0.23 M, [Cl2]eq = 4.4 M. PCl5(g) PCl3(g) + Cl2(g)
Describe a product ideation model or methodology : Research and describe a product ideation model or methodology. Describe the ideation approach and how you might use it in your collaboration assignment for this module.

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