fork(3) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. int X = 10;
  13. int Y = 10;
  14.  
  15. for(int i = 0; i< X; i++) //rysujesz pierwsza krawedz
  16. {
  17. System.out.print("*");
  18. }
  19.  
  20. System.out.println(); //przechodzisz do nastepnej lini
  21.  
  22. for(int i = 0; i< Y-2; i++)
  23. {
  24. System.out.print("*");
  25. for(int j =0 ; j< X-2; j++)
  26. {
  27. System.out.print(" ");
  28. }
  29. System.out.println("*");
  30. }
  31.  
  32. for(int i = 0; i< X; i++) //rysujesz ostatnia krawedz
  33. {
  34. System.out.print("*");
  35. }
  36. }
  37. }
Success #stdin #stdout 0.06s 380224KB
stdin
Standard input is empty
stdout
**********
*        *
*        *
*        *
*        *
*        *
*        *
*        *
*        *
**********