3. Design a class to overload a function compute() as follows:
(i) void compute(int,char): to compute the square of the integer argument if the given character argument is ‘s’ otherwise find its cube.
(ii) void compute(double char): to compute volume of a cube if the given character argument is ‘v’ otherwise find its diagonal.
(iii) void compute(int,int,char): to compute area of a rectangle if the given character argument is ‘a’ otherwise finds its perimeter.
Volume of cube=side3 Area of rectangle=length*breadth
Diagonal of cube=a√3 Perimeter of rectangle=2*(length+breadth)
Answers
Answered by
0
Answer:
hi
Explanation:
heloooooooooooooooooooooooooo
Similar questions
History,
1 month ago
Biology,
1 month ago
English,
1 month ago
English,
2 months ago
Science,
2 months ago
Computer Science,
10 months ago
Computer Science,
10 months ago