By DePaul Dimadis
Choose your prefered Language: greek_flag uk_flag

The information on the machines in a production unit includes:
1. machine number (idnumber - int type)
2. description of the machine (description - string of 80 characters)
3. purchase date (purchaseDate)
4. cost (cost - float type)
5. its history
a. failurerate (float type)
b. number of days left out (downdays - int type)
c. last service date (lastServiced)

Write a C ++ program that will implement the following:
1. Define the necessary structures (structures):
  a. DateType (for dates in the format shown in the example)
  b. StatisticsType (it will include the fields listed in the history)
  c. MachineRec (it will include all the information about the machine and in the order shown in the example)
2. Create in the main program a table of structures with 10 elements of the MachineRec type
3. using functions that will be properly called by main ():
  a. It will enter data in the table from the keyboard
  b. It will display table data
  c. It will calculate and display:
• the average cost of the machines
• the average price of days when machines are out of order
• the number of machines purchased in 2007