Answers

  • Brainly User
2014-06-19T12:15:54+05:30
To calculate the area of  circle, rectangle and  triangle using function overloading.
STEPS:
STEP 1:  Start the program.
STEP 2:  Declare the class name as fn with data members and member functions.
STEP 3:  Read the choice from the user.
STEP 4:  Choice=1 then go to the step 5.
STEP 5:  The function area() to find area of circle with one integer argument.
STEP 6:  Choice=2 then go to the step 7.
STEP 7:  The function area() to find area of rectangle with two integer argument.
STEP 8:  Choice=3 then go to the step 9.
STEP 9:  The function area() to find area of triangle with three arguments, two as Integer and one as float.
STEP 10: Choice=4 then stop the program.

OUTPUT:
Function Overloading              
1. Area of Circle              
2. Area of Rectangle              
3. Area of Triangle              
4. Exit              
Enter Your Choice: 2     
         
Enter the Sides of the Rectangle: 5 5      
                     
Area of Rectangle is: 25               
1. Area of Circle              
2. Area of Rectangle              
3. Area of Triangle            
 4. Exit              
Enter Your Choice: 4
0
tHIS IS ONE EXAMPLE TO TELL HOW TO WRITE
mark as the best answer plzzzz
  • Brainly User
2014-06-19T13:20:03+05:30
This image will help u. moderators please dont delete it is correct.
0