DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Thread: i need help

  1. #1
    Join Date
    Dec 2005
    Posts
    2

    i need help

    i have most of the work done but i cant do a while loop or a linear search i dont no what they are i need the while loop in the bank and i dont no where the linear search goes i have to pull out accounts from th bank and get an average of the amount of money they have please help somebody!!
    Attached Files

  2. #2
    Join Date
    Aug 2005
    Location
    Melbourne...Australia
    Posts
    279
    A linear search is quite simple. You iterate through your elements one at a time starting from the beginning to the end.
    Code:
    for(int x=0; x<size ; x++)
    or with a while loop:
    Code:
    int x=0;
    while(x<size)
    {
           do stuff
           ..
           ..
           x++
    }

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links