Friday, 10 May 2019

test mach

#include <iostream>
using namespace std;

const int Inng = 2;
const int Player = 11;

int main()
{int inngtotal=0;
    int score[Inng][Player];

    cout << "Enter all score for a Player of first Inng and then second Inng. \n";

    // Inserting the values into the score array
    for (int i = 0; i < Inng; ++i)
    {
        for(int j = 0; j < Player; ++j)
        {
            cout << "Inng " << i + 1 << ", Player " << j + 1 << " : ";
            cin >> score[i][j];
        }
    }

    cout << "\n\nDisplaying Values:\n";

    // Accessing the values from the score array
    for (int i = 0; i < Inng; ++i)
    {
        inngtotal=0;
for(int j = 0; j < Player; ++j)
        {
            cout << "Inng " << i + 1 << ", Player " << j + 1 << " = " << score[i][j] << endl;
            inngtotal=inngtotal+score[i][j];
        }
        cout << "\ninng total ="<< inngtotal;
    }

    return 0;
}

No comments:

Post a Comment

Directory implementation

The selection of directory-allocation and directory-management algorithms significantly affects the efficiency, performance, and reliabil...