2. Given a number, give its fibonacii series. Write a program in Java.
Anonymous
public static void main(String[] args) { int result = 0; int next = 1; int prev = 0; for (int i =0; i<=10; i++){ result = prev + next; prev = next; next = result; System.out.println(result); }
Check out your Company Bowl for anonymous work chats.