Write a complete program that have two functions named CylinderVolume() and CylinderArea(). Both functions should receive diameter and height of cylinder as parameters. Each function should return the volume and area respectively to main program. Given formula:
Cylinder volume, v=πr2h
Cylinder area, a=2π2r+2πrh
where π is pi, r is radius and h is height.
shahzrinsaid 0 Newbie Poster
Recommended Answers
Jump to Post@shahzrinsaid: What have you tried? What problems have you encountered? There is plenty of information there to make an honest attempt at the assignment - you have the formulae; all you need to do is construct functions that implement them.
@Sarkurd: It is obvious this is some sort of assignment …
Jump to PostNo point of helping someone who has never tried...
Jump to Post@BERIHUN, Go make your own thread and ask him...
All 12 Replies
shahzrinsaid 0 Newbie Poster
Sarkurd 0 Junior Poster in Training
L7Sqr 227 Practically a Master Poster
Sarkurd 0 Junior Poster in Training
<M/> 170 Why so serious? Featured Poster
ddanbe commented: Nice! +15
BERIHUN -2 Newbie Poster
<M/> commented: ? -2
<M/> 170 Why so serious? Featured Poster
Murphz 0 Newbie Poster
shahzrinsaid 0 Newbie Poster
<M/> 170 Why so serious? Featured Poster
shahzrinsaid 0 Newbie Poster
<M/> 170 Why so serious? Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.