fork download
  1. public class Main {
  2. public static void main(String[] args) {
  3. int[] a =new int[20];
  4. for (int i = 0; i <a.length; i++) {
  5. if(i==0){
  6. a[i]=1;
  7. }
  8. else
  9. a[i]=a[i-1]+2;
  10. System.out.println(a[i]);
  11. }
  12. }
  13. }
Success #stdin #stdout 0.08s 48848KB
stdin
Standard input is empty
stdout
1
3
5
7
9
11
13
15
17
19
21
23
25
27
29
31
33
35
37
39