radko93

Fibonaczi

Mar 5th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. package L1;
  2.  
  3. import java.util.*;
  4.  
  5. public class Zadanie3 {
  6.  
  7.     void metoda() {
  8.         Scanner sc= new Scanner(System.in);
  9.         System.out.println("Podaj liczbe naturalna:");
  10.         Iterator it = new IterFib(sc.nextInt());
  11.         while (!it.isDone()) {
  12.             System.out.println(it.current());
  13.             it.next();
  14.         }
  15.        
  16.     }
  17.  
  18.     public static void main(String args[]) {
  19.        
  20.         Zadanie3 test=new Zadanie3();
  21.         test.metoda();
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment