How do you round up or down a double(not an int) to the nearest dollar? Ex. $23.45 = $23 or $25.54 = $26...etc
Printable View
How do you round up or down a double(not an int) to the nearest dollar? Ex. $23.45 = $23 or $25.54 = $26...etc
Easy. Just write a Round() function.
You know how to round numbers in your head don't you? Just write that out in code with if statements...