marinjordanov

DeckOfCards

Sep 30th, 2021
60
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data