1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Coding

Discussion in 'C++' started by meyup, Mar 23, 2010.

  1. meyup

    meyup New Member

    Joined:
    Feb 15, 2010
    Messages:
    102
    Likes Received:
    0
    Trophy Points:
    0
    Could somebody tell me how to define any number that is between 2 number entered. I know how to ask for the 2 numbers and scan them in but then how do I print for example any whole number between the 2 numbers entered.

    Thanks for any help,
     
  2. pankaj.sea

    pankaj.sea New Member

    Joined:
    Apr 6, 2009
    Messages:
    461
    Likes Received:
    13
    Trophy Points:
    0
    Occupation:
    Web Developer
    Location:
    Kolkata
    Home Page:
    What are you wanting, a random number between the two numbers entered, or a list of numbers between the two numbers entered (easily done with a for loop) or something else?
     
  3. meyup

    meyup New Member

    Joined:
    Feb 15, 2010
    Messages:
    102
    Likes Received:
    0
    Trophy Points:
    0
    I got it figured out. You are right I needed to use a for loop.

    Thanks
     

Share This Page