Develop a C++ program for the loan schemes of gold loan and car loan using pure virtual functions. The bank detail consists of data members such as bank name and branch name. The savings account consists of data members such as grams and price. The current account consists of data members such as salary and loan_limit. The member functions are getdetails() and display().
Develop a C++ program for the loan schemes of gold loan and car loan using pure virtual functions. The bank detail consists of data members such as bank name and branch name. The savings account consists of data members such as grams and price. The current account consists of data members such as salary and loan_limit. The member functions are getdetails() and display().
Design and implement a program that computes final averages for a set of grades. The program reads the grades from a user. (10)
The format of a grade line is:
N grades1, grades2, …………., grades5
Where N is total number of students and grades is the ith score. All scores must be between 0 and 100.
The program reads the grades from the user, calculate and display the average.
The weighted average is computed as:
Create a class Armstrong and include startnumber and endnumber as data member and aslo include member function findArmstrongNumbers() to find all the Armstrong numbers between startnumber and endnumber. If sum of cubes of each digit of the number is equal to the number itself, then the number is called an Armstrong number.
Runtime input
1
500
Create a 'STRING' class which overloads ‘= = ' operator to compare two STRING objects
Define a class Array which can hold 5 elements of type int. Define a member function int Get(int index); which returns the indexth element of the array if index is between 0 to 4 and throws an exception if index is out of bounds. Catch the exception in the main program and print an error.
Write a program to calculate the factorial of an integer entered by the user using:
a. For loop
b. While loop
c. Do while loop
Write a program to print all even numbers between 0 and an integer number entered by
the user using:
a. For loop
b. While loop
c. Do while loop
Write a program which counts for the number of digits in an integer number being
entered by user using:
a. For loop
b. While loop
c. Do while loop
Design a program that uses try-catch mechanism to check whether the integer input entered is correct type or not.