Single File Programming Question
Problem Statement
Write a program to find the square, square root, cube, and cube root of the given number.
Create a class Demo and include a constructor to initialize the value and write a method display to print square, square root, cube, and cube root of the given number after that the destructor destroys the object.
Input format :
The input consists of a single integer n.
Output format :
The output prints the result.
Refer to the sample output for formatting specifications.
Code constraints :
The given test cases fall under the following constraints:
1 ≤ n ≤ 100
Sample test cases :
Input 1 :
15
Output 1 :
Inside Constructor square = 225 square root = 3.87298 cube = 3375 cube root = 2.46621 Inside Destructor
Input 2 :
9
Output 2 :
Inside Constructor square = 81 square root = 3 cube = 729 cube root = 2.08008 Inside Destructor