Improve Article
Save Article
Like Article
Improve Article
Save Article
Given here is a right circular cylinder, whose height increases by a given percentage, but radius remains constant. The task is to find the percentage increase in the volume of the cylinder. Approach: #include <bits/stdc++.h> using namespace std; void newvol(double x) { cout << "percentage increase " << "in the volume of the cylinder is " << x << "%" << endl; } int main() { double x = 10; newvol(x); return 0; }
Output: Time Complexity: O(1), since there is no loop. Auxiliary Space: O(1), since no extra space has been taken. |