cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
How do I round up to the next 100?
How do I round up to the next 100?
Sep 23, 2012 at 6:51pm UTC
krisbkreeme
(4)
For example a user enters a number
double number
cout << " Please enter a number ";
cin >> number
// user enters number 1430
cout << "Your New Number is " << new_number
how do i get new_number to go to the next 100 (aka 1500)
Last edited on
Sep 23, 2012 at 7:09pm UTC
Sep 23, 2012 at 7:33pm UTC
Aceix
(1118)
Check the
<cmath>
header file--to be specific, the
ceil
function:
http://www.cplusplus.com/reference/clibrary/cmath/ceil/
Hope it HELPS!!!
Topic archived. No new replies allowed.