Write a C++ program using two parallel multi-dimensional arrays that allows the
ID: 3641302 • Letter: W
Question
Write a C++ program using two parallel multi-dimensional arrays that allows the user to enter six competitiors' information. For each diver, the data will come from a file containing the diver first and last name, the degree of difficulty followed by the eight judges' scores. Output to the screen the competitiors' full name and the total score recieved by the contestant for the dive. Format your output with two decimal places. For example, a diving judge awards points between 1 and 10, with 1 being the lowest score and 10 being the highest score. If the scores are 9.2, 9.3, 9.0, 9.9, 9.5, 9.5, and 9.8, the contestant receives a total of 56.90 points. (The highest score 9.9 and the lowest score 9.0 are dropped from the total.) Multiply the total points (56.90) times the degree of difficulty (2.3) for the total score (130.87).Explanation / Answer
this is on two dimensional and use multiplication of matrices : //============================================================================ // Name : multiplymatrix.cpp // Author : noga // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include #include #include #include using namespace std; #define ms 3 int main() { int mynode, totalnodes; int i,j,k; int x,c,M; // coutms; // ms=M; int m_a[ms][ms]; int m_b[ms][ms]; int m_c[ms][ms]; int m_c1[ms][ms]; int s; MPI_Status status; MPI_Init(0,0); MPI_Comm_size(MPI_COMM_WORLD, &totalnodes); // get totalnodes MPI_Comm_rank(MPI_COMM_WORLD, &mynode); // get mynode s = ms / totalnodes; if(mynode==0) { printf(" Matrix Multiplication "); printf(" ==================================================== "); //matrix a printf(" matrix a "); printf("-------------- "); for(i=0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.