Advertisement
PavlinBodurov

Untitled

Jan 12th, 2019
1,078
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. package Loops;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class test {
  6. public static void main(String[] args) {
  7. Scanner scanner = new Scanner(System.in);
  8. String cards[][] = {{"2 of spades","3 of spades","4 of spades","5 of spades","6 of spades","7 of spades","8 of spades","9 of spades","10 of spades","J of spades","Q of spades","K of spades","A of spades"},{"2 of clubs","3 of clubs","4 of clubs","5 of clubs","6 of clubs","7 of clubs","8 of clubs","9 of clubs","10 of clubs","J of clubs","Q of clubs", "K of clubs","A of clubs"},{"2 of hearts","3 of hearts","4 of hearts","5 of hearts","6 of hearts","7 of hearts","8 of hearts","9 of hearts","10 of hearts","J of hearts","Q of hearts","K of hearts","A of hearts"},{"2 of diamonds","3 of diamonds","4 of diamonds","5 of diamonds","6 of diamonds","7 of diamonds","8 of diamonds","9 of diamonds","10 of diamonds","J of diamonds","Q of diamonds","K of diamonds","A of diamonds"}};
  9. int inputNumber = Integer.parseInt(scanner.nextLine());
  10. for(int i = 0; i <= inputNumber-2; i++){
  11. System.out.println(cards[0][i] + ", " + cards[1][i] + ", " + cards[2][i] + ", " + cards[3][i]);
  12. }
  13.  
  14.  
  15.  
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement