Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

#include <iostream>

using namespace std;


int main()
{
int x[3][3];
for (int jD = 0; jD < 3; jD++)
{
cout<<"Team" <<jD + 1 <<":\n";
for (int reP = 0; reP < 3; reP++)
{
cout<<"Score in game" <<reP + 1 <<": ";
cin>>x[jD][reP];
}
}

cout<<"\n";

cout<<"Team" << " G1 G2 G3 Total\n";


for (int jD = 0; jD < 3; jD++)
{
int sum = 0;
cout<<jD + 1 <<" ";
for (int reP = 0; reP < 3; reP++)
{
cout<<x[jD][reP] <<" ";
sum += x[jD][reP];
}
cout<<sum <<"\n";
}
return 0;
}

You might also like