Thread: The typical Largest smallest number printing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Awesomefaceradcore bivhitscar's Avatar
    Join Date
    Apr 2006
    Location
    Melbourne, Australia
    Posts
    210
    Quote Originally Posted by Fader_Berg View Post
    You should set min and max to zero. Otherwise they may contain garbage that mess up things.
    What happens if someone enters in all positive integers?


    [EDIT]

    The second half of your statement is spot on though.

    [EDITEDIT]

    ...or all negative integers.
    Last edited by bivhitscar; 06-22-2011 at 07:15 AM. Reason: Clarification
    it's ironic considerate rarity patron of love higher knowledge engulfs me...

  2. #2
    Bit Fiddler
    Join Date
    Sep 2009
    Posts
    79
    Quote Originally Posted by bivhitscar View Post
    What happens if someone enters in all positive integers?


    [EDIT]

    The second half of your statement is spot on though.

    [EDITEDIT]

    ...or all negative integers.
    I don't get it... What happens?

    [EDIT]

    Ahhh...
    Last edited by Fader_Berg; 06-22-2011 at 07:26 AM. Reason: * Pling *

  3. #3
    Registered User
    Join Date
    Jun 2011
    Location
    Ozamiz, Philippines
    Posts
    22
    @Fader_Berg: If the user inputs all positive numbers and you have initialized min to 0 then the value of min will always be 0 and the same with the max if all the numbers are in negative.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extracting largest and smallest number
    By .C-Man. in forum C++ Programming
    Replies: 2
    Last Post: 02-18-2011, 06:29 AM
  2. Replies: 22
    Last Post: 05-29-2009, 05:44 PM
  3. smallest largest number
    By manzoor in forum C++ Programming
    Replies: 10
    Last Post: 05-12-2008, 07:56 AM
  4. largest and smallest number
    By wise_ron in forum C Programming
    Replies: 11
    Last Post: 10-05-2006, 03:25 PM
  5. Find the Largest and Smallest Number
    By Nightsky in forum C Programming
    Replies: 27
    Last Post: 09-04-2006, 03:40 PM

Tags for this Thread