Archived

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

chris1234

variable within range....

Recommended Posts

chris1234    122
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