23 INT ROUND(DOUBLE NUMBER)24 {25 RETURN STATIC_CAST<INT>(FLOOR(NUMBER + 0

22 //Uses cmath:23 int round(double number)24 {25 return static_cast<int>(floor(number + 0.5));26 }SAMPLE DIALOGUEEnter a double value: 9.6Rounded, that number is 10Again? (y/n): yEnter a double value: 2.49Rounded, that number is 2Again? (y/n): nEnd of testing.

Self-Test Exercises