Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


variable within range....

This topic is 6154 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a program that with input of a certain number lets say for example 104 and with input of some smaller numbers lets say 56, 34, 22, 8, 7 and with these last numbers it has to make the larger number with using as little numbers and preferably the largest numbers as possible...well so far my program works, but sometimes it can''t make the target number with the givin number so in that case it has to be within a certain range of the target number....how would I state in a while loop that the loop is being run until it''s within the a given range ( 102 & 106) can''t say it has to be bigger then 102 and smaller then 106 since it starts as 0....? maybe I''m just too tired to see the obvious...or is this really so hard?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!