This repository has been archived by the owner on Feb 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e33ed80
commit 20d65c5
Showing
1 changed file
with
41 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,43 @@ | ||
#include <iostream> | ||
using namespace std; | ||
#include<iostream> | ||
using namespace std; | ||
#define MAX 16 | ||
|
||
int main() | ||
void Nhap(float[][MAX], int&, int&); | ||
bool ktDoiXung(float[][MAX], int, int); | ||
|
||
int main () | ||
{ | ||
float a[MAX][MAX]; | ||
int m,n; | ||
Nhap(a, m, n); | ||
if (m != n) | ||
{ | ||
cout << "No"; | ||
return 0; | ||
} | ||
if (ktDoiXung(a, m, n)) | ||
cout << "Yes"; | ||
else | ||
cout << "No"; | ||
return 0; | ||
} | ||
|
||
void Nhap(float a[][MAX], int& m, int& n) | ||
{ | ||
cin >> m; | ||
cin >> n; | ||
for (int i = 0; i < m; i++) | ||
for (int j = 0; j < n; j++) | ||
cin >> a[i][j]; | ||
} | ||
|
||
bool ktDoiXung(float a[][MAX], int m, int n) | ||
{ | ||
return 0; | ||
} | ||
if (m != n) | ||
return 0; | ||
for (int i = 0; i < m; i++) | ||
for (int j = i + 1; j < n; j++) | ||
if (a[i][j] != a[j][i]) | ||
return 0; | ||
return 1; | ||
} |