Advertisement
marinjordanov

DeckOfCards

Sep 30th, 2021
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public class DeckOfCards {
  2. public static void main(String[] args) {
  3. Scanner scanner = new Scanner(System.in);
  4.  
  5. String card = scanner.nextLine();
  6. int number = Integer.parseInt(card);
  7.  
  8. for (int i = 2; i <= number; i++) {
  9. System.out.printf("%d of spades, %d of clubs, %d of hearts, %d of diamonds", i, i, i, i).println();
  10. }
  11.  
  12. }
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement