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

  Determine the power taken by the motor when supplied

A 3-phase motor has coils wchich can be configured in a Y load. If each load phase has an impedance of 8+j6 ohms determine the power taken by the motor when supplied by a balanced 3-phase voltage source of 440V line to line.

  What are the differences in integrator and differentiators

What are the similarities and differences between the integrator and differentiator. What is a practical application where you would use an integrator or a differentiator.

  When the energy stored in the capacitor will be half

A capacitor of capacitance C=10-6 F is discharged through the resistor of resistance R=10 Ohm. (Switch is closed at t=0) When the energy stored in the capacitor will be half of its initial value

  Calculate the power delievered to the load by each battery

Two full charged 8A-Hr batteries are connected in parallel and supply power to a resistive load of 2.4 ohms. The open-circuit voltage of both batteries is 6.4VDC and the internal(Thevenin) resistances are 0.24 ohms and 0.28ohms.

  How fast have an angular momentum spin

How fast, in rpm, would a 100 g, 50-cm diameter beach ball have to spin to have an angular momentum of 0.10 kg m^2/s

  Find the critical path and determine the propagation delay

Design the combinational 3 bit gray to binary code converter for conversion angular position of a shaft into binary code. 1) Complete the truth table 2)obtain the minimal solution with a K map 3) draw the circuit diagram, labels the inputs and output..

  Design bandstop filter to remove noise to limit distortion

An EKG signal is contaminated by 60-Hz noise. Design a bandstop filter to remove this noise while limiting distortion of the EKG signal. Sketch the magnitude and phase response.

  Find sequence components vfa1-vfa2 and vfa0 at fault rate

At a point f in the system, there is an open-circuit fault on phase-a with a voltage across the open-circuit as Vfa , whereas Vfb =Vfc =0. Similar to the calculations of the short-circuit currents by making use of the sequence networks

  Find the locations of the second order poles at overshoot

For Each Pair of Second-order systems specifications that follow, find the locations of the second order poles a) Overshoot %= 12% , Ts= 0.6 seconds b) Overshoot %= 10%, Tp= 5 seconds c) Ts= 7 seconds, Tp= 3 seconds

  Compare integrals with the separation of a sum into two sums

Although sums behave like integrals, because of the discrete nature of the sums one needs to be careful with the upper and lower limits more than in the integral. To illustrate this, consider the separation of an integral into two integrals.

  Find what is the cost of heat without the installation

If the cost of heat rises by $200 per year (uniform gradient) after the next year and the owner plans to keep the present building for 15 more years, if the interest is 10% per year, what is the cost of heat without the installation

  Determine and plot the voltage-va and the current-ia

The PMAC motor is driving a purely inertial load. A constant torque of 5 Nm is developed to bring the system from rest to a speed of 5,000 rpm in 5 s. Neglect the stator resistance and the leakage inductance.

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