Skip to content

Instantly share code, notes, and snippets.

@JorgeOlvera
Created January 20, 2014 04:19
Show Gist options
  • Save JorgeOlvera/8514794 to your computer and use it in GitHub Desktop.
Save JorgeOlvera/8514794 to your computer and use it in GitHub Desktop.
Fibonnaci Sequence
//1,1,2,3,5,8,13
//Fn = Fn-1 + Fn-2
import java.util.Scanner;
public class Fibonnaci {
public static void main (String[] args) {
int x = 1;
int z = 0
//**
for(int i = 1; i <= 10; i++)
{
int y = x + i
for (int j = 1; j <=10; j++)
{
int z = j + y;
}
System.out.print(z);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment