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. // your code goes here
  13.  
  14. // 1 2 3 4 5
  15. // 6 7 8 9 10
  16. // 11 12 13 14 15
  17. // 16 17 18 19 20
  18. // 21 22 23 24 25
  19.  
  20. for(int a=1;a<=5;a++){
  21. System.out.print(" "+a);
  22. }
  23. System.out.println(" ");
  24. for(int b=6;b<=10;b++){
  25. System.out.print(" "+b);
  26. }
  27. System.out.println(" ");
  28. for(int c=11;c<=15;c++){
  29. System.out.print(" "+c);
  30. }
  31. System.out.println(" ");
  32. for(int d=16;d<=20;d++){
  33. System.out.print(" "+d);
  34. }
  35. System.out.println(" ");
  36. for(int e=21;e<=25;e++){
  37. System.out.print(" "+e);
  38. }
  39. }
  40. }
Success #stdin #stdout 0.13s 48140KB
stdin
Standard input is empty
stdout
  1  2  3  4  5 
  6  7  8  9  10 
  11  12  13  14  15 
  16  17  18  19  20 
  21  22  23  24  25