fork 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[] array = new int[100];
  13.  
  14.  for (int i = array.length / 2, j = array.length - 1;
  15.   i >= 0 && j >= array.length / 2;
  16.   i--, j--)
  17.   System.out.println(i + ":" + j + " = " + (array[j] - array[i]));*/
  18.  
  19. int[] array = new int[100];
  20. int raznost;
  21.  
  22. for (int i = 0, j = array.length - 1; i <= j; i++, j--)
  23.  
  24.  
  25. System.out.println(i + ":" + j + " = " + (i - j));
  26. }
  27.  
  28.  
  29. }
Success #stdin #stdout 0.05s 711168KB
stdin
Standard input is empty
stdout
0:99 = -99
1:98 = -97
2:97 = -95
3:96 = -93
4:95 = -91
5:94 = -89
6:93 = -87
7:92 = -85
8:91 = -83
9:90 = -81
10:89 = -79
11:88 = -77
12:87 = -75
13:86 = -73
14:85 = -71
15:84 = -69
16:83 = -67
17:82 = -65
18:81 = -63
19:80 = -61
20:79 = -59
21:78 = -57
22:77 = -55
23:76 = -53
24:75 = -51
25:74 = -49
26:73 = -47
27:72 = -45
28:71 = -43
29:70 = -41
30:69 = -39
31:68 = -37
32:67 = -35
33:66 = -33
34:65 = -31
35:64 = -29
36:63 = -27
37:62 = -25
38:61 = -23
39:60 = -21
40:59 = -19
41:58 = -17
42:57 = -15
43:56 = -13
44:55 = -11
45:54 = -9
46:53 = -7
47:52 = -5
48:51 = -3
49:50 = -1