I can’t figure out how to do something very simple in my program.
Given a float value f (it could be 0, or it could be 5 million, etc), I need to find the first value x such x >= f (x is greater than f) and x is a multiple of 5.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Divide by 5, round up to the next integer (using
ceil()or similar), multiply by 5 again.