Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct Point{
- int x, y;
- } POINT;
- typedef struct Matrix9x9{
- POINT points[9][9];
- bool fv1(){
- bool result = true;
- for(int i = 0; i < 9; i++){
- for(int j = 0; j < 9; j++){
- if(points[i][j].x > 8 || points[i][j].x < 1
- || points[i][j].y > 8 || points[i][j].y < 1){
- return false;
- }
- }
- }
- return result;
- }
- bool fv2(){
- bool result = true;
- for(int i = 0; i < 9; i++){
- for(int j = 0; j < 9; j++){
- if((points[i][j].x != 0 && points[i][j].x != 1)
- || (points[i][j].y != 0 && points[i][j].y != 1) ){
- return false;
- }
- }
- }
- return result;
- }
- }MATRIX_9x9;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement