☑Kizspy.me
2 of 3
Paper No: 1
The given file Q1.cpp contains statements to enter the radius r and height h of the cylinder. You should
write statements to print the volume of the cylinder.
Hint:
Sbottom=πr².
V = Sbottom h.
π use the M_PI in the cmath library
Notes:
Do not edit given statements in the main function.
You can create new function(s) if you see it is necessary.
Sample input and output:
Input: r=2, h=5
After processing: 62.83
Input: r=1, h=1
After processing: 3.14
Output for marking:
OUTPUT:
62.83
Question 2:
Zoom
+ 100%
Output for marking:
OUTPUT:
3.14
Activate Windows
Go to Settings to activate Windows.
Close