Experiment List
Experiment List
4.Write C++ program which will print (half pyramid) pattern of natural number.
7.Write a C++ program to declare a class “staff” having data members name, basic
salary, DA, HRA< and calculate gross salary. Accept and display data for one staff.
i. HRA=30% of basic
8.Write a C++ program to define a class “City” having data member name,
10.Write a C++ program to define a class “Number” having data member’s x and y
11.Write a C++ program to define a class “Student” having data member roll_no,
name. Derive a class “Marks” from “Students” having data members m1, m2, m3,
total and percentage. Accept and display data for one student.
12. Write a C++ program to define a class “Employee” having data members
“Employee” having data members basic, hra,da, gross_sal. Accept and display
book_name , auther_name, and price . Accept this information for one object of
month, years. Accept this information for five objects using pointer to the array of
objects.
15.Write a C++ program declare a class “polygon” having data member’s width
and height Derive classes “rectangle” and “triangle” from “polygon” having area ()
16.Write a C++ program to interchange the values of two int, float and char using
function overloading.