Answer to Question #207733 in C++ for Binura Thiranjaya

Question #207733

Create 3 float arrays with the names machine A, machine B and machine C. The arrays are of size 4.

Insert machine A, B and C production to the respective array using the function InputProduction().

Print chart of all four (4) days by using the function PrintChart().

Print the report using the function PrintReport().


1
Expert's answer
2021-06-16T15:39:08-0400
#include <iostream>

float A[4], B[4], C[4];

void InputProduction(float value, int idx)
{
  A[idx] = value;
  B[idx] = value;
  C[idx] = value;
}

void PrintChart()
{
  std::cout << "A : [" << A[0] << ", " << A[1] << ", " << A[2] << ", " << A[3] <<"]\n";
  std::cout << "B : [" << B[0] << ", " << B[1] << ", " << B[2] << ", " << B[3] <<"]\n";
  std::cout << "C : [" << C[0] << ", " << C[1] << ", " << C[2] << ", " << C[3] <<"]\n";
}

void PrintReports()
{
  // impl...
}

int main() { 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
APPROVED BY CLIENTS