A program to computes the area and volume

Assignment Help C/C++ Programming
Reference no: EM132095284

!!! Please expalin each line of code and use Java !!!

Write a program that reads in the radius and length of a cylinder and computes the area and volume using the following formulas:

1. Bottom area = Radius * Radius *3.14

2. Cylinder Volume = Bottom Area * Length

3. Cylinder area = (2 * Radius * 3.14 * Length) + (2 * Bottom area) Your program should prompt the user to enter the radius and length of a cylinder.

The program should output the length and radius of the cylinder along with the area and volume of the cylinder. Limit the output values to two decimal places.

Reference no: EM132095284

Questions Cloud

Design the circuit using one rotate-right circuit : Design the circuit using one rotate-right circuit, one rotate-left circuit, and one 2-to-1 multiplexer to select the desired result. Derive the code.
Discuss ipv4 and ipv6 according to its capabilities : Discuss IPv4 and IPv6 according to its capabilities to address a single device on any network in the world and how it correlates to the Internet of Things.
Explain with risk management is it appropriate to know : What if you move forward with a risk you think is manageable but not mitigate it?
The difference between while loop and for loop in c language : Please explain the difference between while loop and for loop in C language with examples.
A program to computes the area and volume : Write a program that reads in the radius and length of a cylinder and computes the area and volume using the following formulas.
Would you consider dividing the work performed : Would you consider dividing the work performed by this program in multiple threads on a single-core system? Why?
Write the first 5 terms of the recurrence relation : Using the explicit formula you found in part b, evaluate a5. You must show that you are using the equation from part b.
What are some major socioeconomic programs : What are some major socioeconomic programs and their policies as it relates to contracting?
Explain intermediate representation code : Please explain "Intermediate Representation" code that is generated by a compiler? Is it an assembly language?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create an array of customer names

In preparation for more complex data processing tasks using object-oriented objects that you will create in up-coming units, in this unit you will utilize arrays to build some basic processing logic and structures.

  Write a program that uses a structure to store a file

Write a program that uses a structure to store the following inventory data in a file: Item Description, Quantity on Hand, Wholesale Cost and Retail Cost

  Write a function fromhosttonetwork in c

Write a function fromHosttoNetwork in C that will accept an integer variable and covert it from host byte order to network byte order and write a function fromNetworktoHost in C that will accept an integer in network byte order and return an integ..

  When given a c-string reference and a character

Write a program that implements and tests the following functions for use with C-strings (you may assume that  input obtained by the program is limited to a maximum of 80 characters):

  Write a function that will take in an array of integers

Write a function that will take in an array of integers, sum up all the values in the array, and return the result to the calling function.

  Program that read in from the key board a string

Write a complete C++ program that read in from the key board a string and convert all letters in the string to upper cases. You are not allowed to use toupper function.

  Write the code for the for-loop initializations

Write the code for the for-loop initializations and the for-loop body. Carefully study and compare the pseudocode and C++ for loops in the commentary.

  Point of sale system

A customer enters the supermarket. The customer takes a shopping cart or basket and strolls through the supermarket. The customer selects items from the shelves and puts them in the shopping cart or the basket. When finished, the customer brings the ..

  Write a program to swap value of two variables without using

Write a program to swap value of two variables without using third variable. Write a program which input three numbers and display the largest number using ternary operator. Write a program which accepts amount as integer and display total number of ..

  Design a deck plan space ship in eclipse

Develop a simple interactive two-dimensional spaceship deck plan editor using OpenGL and GLUT. Your program will enable a user to create and save a deck plan of a hypothetical spaceship comprising the hull walls.

  Design and code swing gui for a two-player tic-tac-toe game

Design and code a Swing GUI for a two-player tic-tac-toe (thoughts and crosses) game on a 3 * 3 game board. The J Frame should use a Border Layout.

  Write a c program that calculate the gross pay of employee

Write a C program that will calculate the gross pay of a set of employees. For each employee the program should prompt the user to enter the clock number, wage rate, and number of hours as shown below.

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