I can figured out what i do wrong. I try to write simple program that inputs 20 numbers from user and display them in fange from 10 to 100, only if not duplicated.
(Marilyn added code tags to display formatted code) [ March 22, 2003: Message edited by: Marilyn de Queiroz ] [ edited to alleviate the pain of scrolling left and right -ds ] [ March 23, 2003: Message edited by: Dirk Schreckmann ]
A few things to think about: 1. Why do you have i++ on two places in your for loop in your pick method? 2. What should happen to i when a duplicate is found, should it still be increased? I think these things should correct your problem, if not, please state what the program does and what you think it should do instead. Good luck!
What do you get when you compile the code? Do you get an exception when you run the program? You are also creating a lot of InputStreamReaders and BufferedReaders here. Maybe it's better to create only one pair and reuse them. [ March 23, 2003: Message edited by: Barry Gaunt ]