Week 6 Exercise 106 Infinite loop

31 views
Skip to first unread message

Juan Boullosa

unread,
Nov 4, 2017, 7:14:42 PM11/4/17
to mooc.fi
Hi,

I'm having problems with week 6 exercise 106  on course 2013-OOProgrammingWithJava-PART1.

The code seems to work fine when I input a value belonging to the matrix, or one that it's bigger or smaller than the maximum and minimum values,
but when I input a number in the middle that is not in the matrix, say 6, runs in an infinite loop and I don't know how to solve this.

The link to my work is here: http://paste.mooc.fi/7c43f9a2

Best regards


Supported languages are English and Finnish

Please use our build in TMC Pastebin when asking questions related to your code  
 
TMC Plugin has built-in code sharing feature. 
In NetBeans, select TMC -> Send code to TMC pastebin. Copy the link you receive and paste it to your message.  

You may use our web interface to share code snippets: http://paste.mooc.fi

Tracy Karjala

unread,
Dec 10, 2017, 1:41:55 AM12/10/17
to mooc.fi
I'd put in some System.out.println statements in the method to show the values for beginning and end.  You'll probably see what's going on then.

Tracy
Reply all
Reply to author
Forward
0 new messages