Program to print fibonacci series using classes and objects
: Write a program to overload operators in the same program by writing suitable operator friend
functions for following expression:
O7=((O1>=O2) +(O3 && O4) *(O5<O6)) [Here O1,O2,O3,O4,O5,O6 and O7 are objects of a class
“overloading”, and this class is having one integer data member]
Write c++ program that receives the radius of a circle and calculate The area
Write a program to overload operators in the same program by writing suitable operator member functions for following expression: O7= ((O1 % O2)>(O3 || O4) - (O5>O6)) [Here O1,O2,O3,O4,O5,O6 and O7 are objects of a class “overloading”, and this class is having one integer data member]
Write a program to take input for n number of doctor records and write records of all cardiologists in a file named: “record1”. Also write records of all those doctors in another file named: “record2” who are taking salary more than INR 80,000. After writing records in both files, merge their contents in another file: “finalrecord” and read all records of “finalrecord” file and display on screen. [Attributes of doctor: doc_id, doc_name, doc_specialization, doc_salary]
ewrite the following C++ code in pseudocode. (5)
for (int x = 1; x <= 10; x++) {
for (int y = 10; y >= x; y--) {
if (y % 2 == 0) {
cout << "*";
}
else {
cout << "#";
}
}
cout << endl;
Write a C++ program for a lecturer to convert all his (5 students) student marks to
a percentage. Enter the total mark of the test, and then enter for each student his
student number, and the mark obtained by the student. Display the student number,
percentage, and status indicating whether the student passed (50% or more) or failed
the test.
Include the following function and sub procedures (as shown in the table below):
LectureApp
NO METHOD NAME DESCRIPTION MARK
1 main This function prompts for the total and
also invokes the required procedures to
display the results.
7
2 getData This sub procedure prompts for the
student number and mark obtained by the
student from the end-user.
4
3 determinePercentage This function returns the mark obtained in
percentage.
4
4 determineStatus This function returns true if the student
passed or false, otherwise.
6
5 printOutput This sub procedure displays the output as
shown in the sample output.
4
for (int i = 1; i <= 100; i++)
{
for (int j = 2; j < i; j++)
{
if (i % j == 0)
{
bcd++;
break;
}
}
if (bcd == 0 && i != 1)
{
cout << i << endl;
}
bcd = 0;
}
Write a program to overload operators in the same program by writing suitable operator member functions for following expression:
07= ((01 % 02)>(03 || 04) - (05>06)) [Here 01,02,03,04,05,06 and 07 are objects of a class "overloading", and this class is having one integer data member]
Write a program to take input for n number of doctor records and write records of all cardiologists in
a file named: “record1”. Also write records of all those doctors in another file named: “record2” who are
taking salary more than INR 80,000. After writing records in both files, merge their contents in another
file: “finalrecord” and read all records of “finalrecord” file and display on screen. [Attributes of doctor:
doc_id, doc_name, doc_specialization, doc_salary]