Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class FullHouse {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- int counter = 0;
- String[] rows = { "2", "3", "4", "5", "6", "7",
- "8", "9", "10", "J", "Q", "K", "Ace" };
- String[] suit = { "♥", "♠", "♦", "♣" };
- for (int i = 0; i < 13; i++) {
- for (int j = 0; j < 13; j++) {
- if (i != j) {
- for (int a = 0; a < 2; a++) {
- for (int b = 1; b <3; b++) {
- for (int c = 2; c < 4; c++) {
- if (a < b && a < c && b < c) {
- for (int k = 0; k < 3; k++) {
- for (int p = 1; p < 4; p++) {
- if (k < p) {
- System.out.println(rows[i]+ ""+suit[a]+" "
- +rows[i]+ ""+suit[b]+" "
- +rows[i]+ ""+suit[c]+" "
- +rows[j]+ ""+suit[k]+" "
- +rows[j]+ ""+suit[p]+" ");
- counter++;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- System.out.println(counter);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement