Guest User

Untitled

a guest
Oct 21st, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. /*
  2. * To change this template, choose Tools | Templates
  3. * and open the template in the editor.
  4. */
  5.  
  6. package javaapplication1;
  7.  
  8. /**
  9. *
  10. * @author rlm11264
  11. */
  12. public class Main {
  13.  
  14. /**
  15. * @param args the command line arguments
  16. */
  17. public static void main(String[] args) throws Exception
  18. {
  19.  
  20. String card[][] = new String[4][10];
  21. int x,y;
  22. for (y=0;y<10;y++)
  23. {
  24. for (x=0;x<4;x++)
  25. {
  26. card[x][y]="X";
  27. }
  28. }
  29. System.out.printf("%5s%10s%10s%10s%10s","Rank","Clubs","Diamonds","Spades","Hearts");
  30. System.out.println();
  31.  
  32.  
  33. for (y=0;y<10;y++)
  34. {
  35. System.out.printf("%3d", y+1);
  36. for (x=0;x<4;x++)
  37. {
  38. System.out.printf("%10s", card[x][y]);
  39. }
  40. System.out.println();
  41. }
  42.  
  43. }
  44.  
  45.  
  46. }
Add Comment
Please, Sign In to add comment