Answer to Question #202420 in C++ for Jordaine Myrie

Question #202420

A machine’s engine coil rotates in a 360o motion ten times every second once the machine is in operation. Nebisko Biscuits starts its production at 10:00 am and ends at 4:00 pm (6 hours) each day. The company packages one biscuit every 5 seconds. A report of the total biscuits packaged per day is given to the production manager for their weekly report. The machine encountered a fault yesterday and had stopped working for 35 minutes. Implement a C++ program to compute and output the total of times the coil is expected to rotate during normal period of production; as well as compute and output with the total amount of biscuits that is expected to be packaged daily. Your solution must also compute and output the total amount of biscuits that would have been packaged based on the duration for which the machine encountered a fault yesterday. 


1
Expert's answer
2021-06-04T06:06:26-0400
#include <iostream>

const int hours = 6; // from 10:00 a.m. to 04:00 p.m. 

int to_minutes(int hour) {
  return 60 * hour;
}

int to_seconds(int minute) {
  return 60 * minute;
}

int main() {

  std::cout << "For a day : " << to_seconds(to_minutes(hours)) / 5 << std::endl;  
  std::cout << "For a day(with fault) : " << to_seconds(to_minutes(hours)) / 5 - 35 / 5 << std::endl;
  return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog