Thread: Finding the biggest number?

  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    24

    Finding the biggest number?

    If I scanned ten numbers, how do I printf the biggest number the program scanned?

    Example: 1 2 3 4 5 6 9 8 7 10

    Your Biggest Integer is: 10.

  2. #2
    Registered User
    Join Date
    May 2006
    Posts
    903
    I don't know the C way to do this, but basically you just have to take each set of characters and check if it is higher than the highest you have listed (you will need a buffer).

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Store the first number. Compare it with the next. Replace if bigger. Repeat until done. You fail at Spock.


    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with this compiler error
    By Evangeline in forum C Programming
    Replies: 7
    Last Post: 04-05-2008, 09:27 AM
  2. Logical errors with seach function
    By Taka in forum C Programming
    Replies: 4
    Last Post: 09-18-2006, 05:20 AM
  3. Hmm.. Ai? Finding the pattern in number squences?
    By Zeusbwr in forum C++ Programming
    Replies: 8
    Last Post: 04-02-2005, 06:13 PM
  4. Prime number program problem
    By Guti14 in forum C Programming
    Replies: 11
    Last Post: 08-06-2004, 04:25 AM
  5. Random Number problem in number guessing game...
    By -leech- in forum Windows Programming
    Replies: 8
    Last Post: 01-15-2002, 05:00 PM