I have a problem dealing with answer in money, and after prompting the user for a number and performing a calculation using multiple functions, I am getting numbers with lots of decimals. Is there a function where you can specify wanting only 2 decimals points? I know that ceil and floor are functions for rounding, but they do not give me what I want. Any suggestions would be great!
Rounding and remainder functions
ceil
Round up value (function )
floor
Round down value (function )
fmod
Compute remainder of division (function )
trunc
Truncate value (function )
round
Round to nearest (function )
lround
Round to nearest and cast to long integer (function )
llround
Round to nearest and cast to long long integer (function )
rint
Round to integral value (function )
lrint
Round and cast to long integer (function )
llrint
Round and cast to long long integer (function )
nearbyint
Round to nearby integral value (function )
remainder
Compute remainder (IEC 60559) (function )
remquo
Compute remainder and quotient (function )