Can Örs
010980058



Menu


:.Ana Sayfa»

:.Kategoriler»
:.Forum»
:.Info»
:.Mail»

2nd Homework
Problem: Consider a geometrical body which consists of a steel-cylinder and a cone of lead having the same radius. Then, prepare a computer program having the structure described in below :

The main program will: read the input values (radius r=50cm, height of the cylinder, h1=300cm, height of the cone h2 = 150cm, density of steel, d1 = 7.85 t/m3, density of lead d2 = 11.40 t/m3 )

•calculate the total volume of the given body
•calculate the total weight of the given body

finally print,
•the input values
•the volume of the cylinder
•the weight of the cylinder
•the volume of the cone
•the weight of the cone
•the total volume of the given body
•the total weight of the given body

using list directed output command including the above-given expressions for the input values and the results obtained.Also your program must include,

•A function sub-program will calculate only the bottom surface area
•A subroutine sub-program will calculate the volume of the cylinder the weight of the cylinder
•Another subroutine sub-program will calculate the volume of the cone the weight of the cone

The Answers should be similar to the compiled versions below:

Compiled version of the problem (cylinder_cone.exe)
Another example by Coşkun Kuzu (Thanks). (cylinder_cone_2.exe)

Hint: You may check whether your program results correct or false by the help of the compiled versions.





Valid HTML 4.01!Install Cortona VRML Client!Get Adobe ReaderGIMP - Free7-ZipGet Firefox
Copyright © Can Örs 2002-2005.Lütfen okuyun.