Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int input = scanner.nextInt();
- if (input > 1 && input < 15) {
- for (int j = 2; j <= input; j++) {
- if (j < 11) {
- System.out.print(j + " of spades," + " " + j + " of clubs," + " " + j + " of hearts," + " " + j + " of diamonds");
- System.out.println("");
- }
- if (j > 10) {
- switch (j) {
- case 11:
- System.out.println("J of spades" + ", J of clubs" + ", J of hearts" + ", J of diamonds");
- break;
- case 12:
- System.out.println("Q of spades" + ", Q of clubs" + ", Q of hearts" + ", Q of diamonds");
- break;
- case 13:
- System.out.println("K of spades" + ", K of clubs" + ", K of hearts" + ", K of diamonds");
- break;
- case 14:
- System.out.println("A of spades" + ", A of clubs" + ", A of hearts" + ", A of diamonds");
- break;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement