Pascal

Moderators: None (Apply to moderate this forum)
Number of threads: 4095
Number of posts: 14004

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Find Largest/Smallest Number WITHOUT USING ARRAY Posted by Minami_Sho on 5 Mar 2010 at 11:53 PM
Hi, I was given a question about finding largest/smallest number of 10 numbers WITHOUT USING ARRAY.

I usually do this kind of question using array but this question does not require array in it.

Any hints or ways to do that?
Report
Re: Find Largest/Smallest Number WITHOUT USING ARRAY Posted by Roanneeee on 11 Mar 2010 at 10:23 AM
Umm.. You could do some sort of loop, with a value used inside of the loop (to store the largest number) which would go through each of the numbers, check if it is larger, then store it in the value if it is. Then you could just assign that value to whatever you want. I mean, that's how I would of done it normally, how would you do it with arrays?



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.