Write a function power() that takes a double value n and an int p, returning n raised to p. Use a default value of 2 for p to square n if omitted. Create a main() function to get user input and test power().
Execute →Create a Point structure with X and Y coordinates. Allow the user to input values for two points, compute their sum as a third point, and display the result.
Execute →Create a four-function calculator that takes two numbers and an operator, performs the operation using a switch statement, and displays the result. After each calculation, ask if the user wants to continue (Y/N).
Execute →Create a phone structure to store a phone number's area code, exchange, and number separately. Initialize one variable and take user input for another. Then, display both numbers.
Execute →Create two classes, DM (meters & centimeters) and DB (feet & inches), to store distances. Implement a friend function to add a DM object with a DB object. The result can be stored in either DM or DB, based on the required unit. Display the result accordingly in meters & centimeters or feet & inches.
Execute →Create a Rational class with NUMERATOR and DENOMINATOR (double). Overload +, - and * operators.
Execute →Define a father class with a protected age and a virtual iam() function. Derive son and daughter classes, overriding iam() with appropriate messages. Implement constructors for both. Demonstrate polymorphism using pointers.
Execute →Write a program that creates a binary file by reading the data for students from the terminal. The data includes roll number, name (max 30 characters), and marks.
Execute →Create a Date class to store year, month, and day. Define a base class for patient details (name, admission date, disease, discharge date) with functions to enter and display records. Derive a class to include age and list pediatric patients (age < 12).
Execute →Create a tollbooth management system with functions payingCar(), nopayCar(), and display().
Execute →