Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Was.is.hier.verpackt;
- public class Fibonacci
- {
- // int v=1;
- // int vv=2;
- // int erg;
- // public int fibonacci()
- // {
- // for(v=1;v<=50;v++)
- // erg=v+vv;
- // v=vv+erg;
- // vv=v+erg;
- // return v;
- //
- // }
- public static void main(String[] args)
- {
- int v=1;
- int vv=2;
- int erg =0;
- for(v=1;v<=50;v++)
- erg=v+vv;
- System.out.println(erg);
- v=vv+erg;
- vv=v+erg;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement