M.M.K Posted November 19, 2007 Report Share Posted November 19, 2007 HI The following is my program ,but there is a problem The problem is : The output dose not reaches the Max. value What should I do to solve that??? Thank u Quote Link to comment
Aitor Solar Posted November 19, 2007 Report Share Posted November 19, 2007 QUOTE(M.M.K @ Nov 18 2007, 10:47 AM) The output dose not reaches the Max. value Because i goes from 0 to N-1, so your last iteration output is MAX - INC. Add a +1 to the N or to the i. Keep also in mind that you are casting a double to an int when you set the N value; you have no guarantee the selected increment can reach the max value (for example, if MIN=0, MAX=1 and Increment=0.3, you won't reach 1 but 0.9 or 1.2, depending on the N value). Saludos, Aitor Quote Link to comment
akala Posted November 19, 2007 Report Share Posted November 19, 2007 I agree with Aitor. And you must connect to N of For Loop only an Integer. For exmple if you connect the value 3.4 the For Loop will interact 3 times and the value of i will be 2 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.