Answer to Question #169978 in C++ for Youssef Fekry

Question #169978

Write a program to control a set of 10 motors; the motors are operating under load balancing mechanism as

follows:

• Motors operate in pairs as follows: 1,10 then 2, 9 then 3,8 then 4,7 then 5,6 then repeat.

• The operating duration for each pair is 10,000 milliseconds.

• After each operating cycle, all motors must be OFF for 10,000 milliseconds then a new cycle starts.

• The operating sequence is running 24/7.


1
Expert's answer
2021-03-09T08:03:52-0500
#include <iostream>
using namespace std;
int main () {
    int motors[2][10] = {{1, 10}, {2, 9}, {3, 8}, {4, 7}, {5, 6}, {6, 5}, {7, 4}, {8, 3}, {9, 2}, {10, 1}};
    int operatingDuration = 10000;
    int cycleDuration = 10000;
    int timeDuration = 86400;
}

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
APPROVED BY CLIENTS