Given a text file containing unknown number of lines, each line containing three integer values representing the height of a building in (Yard foot inches) separated by space. Write a well-documented C++ program that
Write a C++ program that defines an integer array of size 18, the program asks the user to fill the array from the keyboard. After filling the array, the function prints all values that are divisible by 3 and less than the average
Write a program using c++ with class GCD for finding Greatest Common Divission (GCD) of an input positive integer a, b.
Consider the problem of making change for N cents using the fewest number of coins. Assume that the coin set consists of c1, c2, …, cd; and each coin’s value is an integer. Write a greedy algorithm for that.
Sample input:
4
1 10 25 5
173
Sample output:
#25 cents --- 6
#10 cents --- 2
#1 cents --- 3
Total 11 coins
sample input:
2
3 5 16
sample output:
#5 cents --- 3
Opps! can’t form 16 taka
Implement the Shape hierarchy designed (which is based on the hierarchy of Fig below). Each TwoDimensionalShape should contain function getArea to calculate the area of the two-dimensional shape. Each ThreeDimensionalShape should have member functions getArea and getVolume to calculate the surface area and volume, respectively, of the three-dimensional shape. Create a program that uses a vector (array) of Shape pointers to objects of each concrete class in the hierarchy. The program should print the object to which each vector (array) element points. Also, in the loop that processes all the shapes in the vector (array), determine whether each shape is a TwoDimensionalShape or a ThreeDimensionalShape. If a shape is a TwoDimensionalShape, display its area. If a shape is a ThreeDimensionalShape, display its area and volume
Implement the Shape hierarchy designed (which is based on the hierarchy of Fig below). Each TwoDimensionalShape should contain function getArea to calculate the area of the two-dimensional shape. Each ThreeDimensionalShape should have member functions getArea and getVolume to calculate the surface area and volume, respectively, of the three-dimensional shape. Create a program that uses a vector (array) of Shape pointers to objects of each concrete class in the hierarchy. The program should print the object to which each vector (array) element points. Also, in the loop that processes all the shapes in the vector (array), determine whether each shape is a TwoDimensionalShape or a ThreeDimensionalShape. If a shape is a TwoDimensionalShape, display its area. If a shape is a ThreeDimensionalShape, display its area and volume
1. Using the looping statement. Create a program that will display the following:
A. 5
10
15
20
25
30
B. 100 90 80 70 60 50 40 30 20 10
Write a C++ program that will: 5.1 Accept student’s information into three parallel arrays. The capture of the students’ marks must be a sentinel-controlled mark that is below zero for either the continuous assessment (term) mark or the final mark. Use a sentinel-controlled loop that will exit when the user types in the word ’Done’ instead of a student’s name. For each mark, use a function: int validateData(string,int) that receives a message to be displayed to the user in case the mark is not acceptable, and also the captured mark. Marks can only be between 0 and 100.
1. Read 10 integers from the keyboard in the range 0 - 100, and count how many of them are larger than 50, and display this result.
1. Using the looping statement. Create a program that will display the following:
A. 5
10
15
20
25
30
B. 100 90 80 70 60 50 40 30 20 10