Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int anterior = 0;
- int anteriorAnterior = 1;
- int limite = 30;
- String texto = anterior+" "+anteriorAnterior+" ";
- for (int i = 0; i < limite; i++) {
- int fn = anterior+anteriorAnterior;
- anteriorAnterior = anterior;
- anterior = fn;
- texto += fn+" ";
- }
- System.out.println(texto);
Advertisement
Add Comment
Please, Sign In to add comment