Suppose you want to verify the interest calculation used by your bank on a loan. The interest rate is 15.5 percent , stored as .155 in a floating-point variables. The amount of interest you are is computed by multiplying that by the number of days in a year. C++ must convert the integer 365 to a floating-point literal automatically, because it is used in combination which a floating-point variable.
Comments
Leave a comment