error in the program while running.

Discussion in 'C++' started by ballurohit, Jun 2, 2013.

  1. ballurohit

    ballurohit New Member

    Joined:
    Nov 18, 2011
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    retired
    Location:
    Gujarat
    The program gets error. The relevant txt file is enclosed.

    kindly guide me for the same.
     
  2. hobbyist

    hobbyist New Member

    Joined:
    Jan 7, 2012
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    0
    you've initialized years to 3 and the loop test condition years <= 3. You haven't incremented years inside of the loop, so it becomes infinite.

    Initialize years to 1 and increment it inside of the loop.
     
  3. ballurohit

    ballurohit New Member

    Joined:
    Nov 18, 2011
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    retired
    Location:
    Gujarat
    Very very thanks sir,

    I am very kind of u for giving such guidelines. I find u in best of health by the grace of God.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice