How do I round up to the next 100?

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
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.