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

  What is the range of the sensor voltage outputs

A manufacturer specification sheet lists the transfer function of a pressure sensor as 45±5% mV/kPa with a time constant of 4±10%. A highly accurate test system applies a step change of pressure from 20 kPa to 100 kPa.

  Determine the direction of current in a multiloop circuit

how do we determine the direction of current in a multiloop circuit with more than one source of e.m.f?

  Calculate the motor phase currents and line currents

A three-phase 5 hp, 208 V motor has an efficiency of 92%, and a power factor of 0.87 (lagging) when it runs at full power. Calculate the motor phase currents and line currents if the motor is wye connected, and delta connected.

  What is the magnetic dipole moment of each cobalt atom

determine that the total field B within the sample is one tesla. Calculate M and determine what percentage of the volume now consists of domains with magnetization parallel to the field.

  Find cutoff frequencies if sampling frequency in 30 khz

Sketch magnitude and phase responses (as linear gain versus digital frequencies) for each filter (use [0,π]). Indicate filter type. Find cutoff frequencies if sampling frequency in 30 kHz. Use 6 points only. Do not use MATLAB.

  Calculate next value of function with cvsd modulation scheme

During the k^th sampling interval of a CVSD modulation scheme, the current value of input x(k) is 1000, the previous value of approximating staircase function x f(k-1) is 990, and the current value of ä(k-1) is 30

  What is the output of the correlator for user1 for first bit

Sketch the baseband signals for the two users when user 1 sends the bits 011, and user 2 sends the bits 101. Add the signals for the first bit only, and show that the output of the correlator for user 1 is -4, corresponding to a 0

  Design circuit using only two-three and four-input nand gate

Design a circuit that will add either 1 or 2 to a 4-bit binary number N. Let the inputs N3, N2, N1, N0 represent N. The input K is a control signal. The circuit should have outputs M3, M2, M1, M0, which represent the 4-bit binary number M.

  Calculate and return the angle in radians

write a script that will call: a function to prompt the user for an angle in degrees and call a function to calculate and return the angle in radians (note:pi radian =180) and call a function to print the result.

  Determine the energy in the signals odd part

A signal x(t) can be represented as x(t)=xe(t)+xo(t) where xe(t)=(1/2){x(t)+x(-t)} is the even part, and xo(t)=(1/2){x(t)-x(-t)} is the odd part of the signal. Let x(t) be an energy signal with an energy of 20 Joules. Suppose the even part of x(t) is..

  What makes base 16 an attractive numbering system

1.Convert 5EDA into binary number. What makes base 16 (Hexadecimal) an attractive numbering systems for representing values in computers 2. What is 4365 - 3412 when these values represent unsigned 12-bit octal numbers

  Find the output voltage

A temperature sensor has a static transfer function of 0.15 mV/C° and a time constant of 3.3 s. If a step change of 22° to 50° C is applied at t=0, find the output voltage at 0.5 s from t=0s to t=10s

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