Quote:
i tried getting a solution to it after working through www.w3schools.com
How about doing what you are supposed to do, and actually think about the problem. If the current number is greater than the existing maximum then how would you remember it for the next time round the loop?