Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SixQuiPrend {
- private static final int NB_CARD_MAX = 104;
- public static int findNumberOfBullHeads(int value) {
- int bullHeads = 1;
- bullHeads += (value % 5 == 0) ? 1:0;
- bullHeads += (value % 10 == 0) ? 1:0;
- bullHeads += ((value % 11 == 0) && (value != 100)) ? 4:0;
- return (value == 55) ? 7:bullHeads;
- }
- public static void gameLoop() {
- for (int cardValue = 1 ; cardValue <= NB_CARD_MAX ; cardValue++) {
- System.out.println(cardValue + " -> " + findNumberOfBullHeads(cardValue));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement