-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathO2.1.cpp
42 lines (41 loc) · 803 Bytes
/
O2.1.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int m,n;
cout<<"Nhap vao so doi tham gia: "<<endl;
cin>>n;
cout<<"Nhap vao so tran: "<<endl;
cin>>m;
cout<<"Nhap so diem tung doi qua tung tran dau"<<endl;
cout<<"Thang 2, Hoa 1, Thua 0"<<endl;
int a[n][m];
int S;
for(int j=1;j<=n;j++)
{
for(int i=0;i<m;i++)
{
cout<<"Nhap ket qua tran "<<i+1<<" doi "<<j<<" la: "<<endl;
cin>>a[i][j];
}
}
for(int j=1;j<=n;j++)
{
for(int i=0;i<m;i++)
{
cout<<"\t"<<a[i][j];
}
cout<<"\n";
}
for(int j=1;j<=n;j++)
{
for(int i=0;i<m;i++)
{
S =a[i][j] + a[i][j];
}
cout<<"\n";
}
cout<<S;
return 0;
}