Initial Basics – Geometry – Problem #11

IIT Kharagpur CS10001 / CS11001 Programming and Data Structures Lab Question Archive

Difficulty: Hard

Problem Statement

Given the base radius and total surface area (curved surface area + top circular area + bottom circular area) of an enclosed right circular cylinder in cm, first calculate the height of the cylinder (in cm) and then find its volume (in cm3 ). Hence, calculate the cost of storing a perfume to fill exactly (2/3)rd of the cylinder at an amount of Rs.10 per cubic centimeter and the remaining volume is filled with Nitrogen gas at Rs.2 per cubic centimeter. Your input should be the radius and surface area of the cylinder (in cm and cm2 respectively) and you should display the height, volume and the cost of storing the perfume with the Nitrogen gas. Assume, π = 3.141 Curved surface area of cylinder = 2*π*base radius*height Volume = π*radius2*height

Back to Lab Problems
Initial Basics/Geometry/Problem #11

Lab Problem Statement

Specifications & Problem DetailsIIT Kharagpur PDS Archive
Loading question...

Interactive C Compiler · Problem #11

WASM In-Browser

Runs directly on your machine · Zero remote server dependency

Compiler downloads on first Run (large, saved in your browser after that)
main.cCtrl + Enter to run
1
2
3
4
5
6
7
Input (stdin)given to scanf / cin
Output

Output appears here. Press Run to compile and execute.