ALGORITHM:
Step 1: Start the pogram.
Step 2: Declare the class.
Step 3: Declare and define the inline function for multiplication and cube.
Step 4: Declare the class object and variables.
Step 5: Read two values.
Step 6: Call the multiplication and cubic functions using class objects.
Step 7: Return the values.
Step 8: Display.
Step 9: Stop the program.
PROGRAM:
07 | inline float mul(float x,float y) |
11 | inline float cube(float x) |
22 | cout<< "Enter two values:" ; |
24 | cout<< "\nMultiplication value is:" <<obj.mul(val 1 ,val 2 ); |
25 | cout<< "\n\nCube value is :" <<obj.cube(val 1 )<< "\t" <<obj.cube(val 2 ); |
Output:
Enter two values: 5 7
Multiplication Value is: 35
Cube Value is: 25 and 343
Tidak ada komentar:
Posting Komentar