Hi guys I am quite new to java, and been trying to make a fibonacci number program just to learn more.
However I have search the web seen examples and more and I still cant get run this code, there seems to be something wrong with>
int N = Integer.parseInt(args [0]), in soecific with the index of the array.
Could someone tell me what is it?
Thanks a lot
public class Main {
public static void main(String[] args) {
int N = Integer.parseInt(args[0]);
int f = 0, g = 1;
for (int i = 1; i <= N; i++) {
f = f + g;
g = f - g;
System.out.println(f);
}
}
}