Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update Exercise_08_22.java#37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
tanker405th wants to merge1 commit intojsquared21:master
base:master
Choose a base branch
Loading
fromtanker405th:patch-1
Open
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletionsExercise_08/Exercise_08_22/Exercise_08_22.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -18,11 +18,11 @@ public static void main(String[] args) {

// Display if every row and every column have an even number of 1s
System.out.println("Every row" +
(isAllRowsEven1s(matrix) ? "" : " does not " +
"have an even number of 1s"));
(isAllRowsEven1s(matrix) ? "does have an even number of 1s" :
" does nothave an even number of 1s"));
System.out.println("Every column" +
(isAllColumnsEven1s(matrix) ? "" : " does not " +
"have an even number of 1s"));
(isAllColumnsEven1s(matrix) ? "does have an even number of 1s" :
" does nothave an even number of 1s"));
}

/** isAllRowsEven1s returns true is every row has an even number of 1s */
Expand DownExpand Up@@ -52,4 +52,4 @@ public static boolean isAllColumnsEven1s(int[][] m) {
}
return true;
}
}
}

[8]ページ先頭

©2009-2025 Movatter.jp