Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Created by Betim on 4/27/2015.
- */
- public class Iter {
- public static void iter(long[] n){
- for(int i=0;i<n.length;i++){
- if(i==0||i==1){
- n[i]=1;
- }
- else{
- n[i]=n[i-1]+n[i-2]+1;
- }
- System.out.println(n[i]);
- }
- }
- public static void main(String[] args){
- long[] x=new long[31];
- iter(x);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement