1/11/00
COM1100 Winter2000 Yuhong Yin Northeastern University
32
C++ Data Type – floating point
oUsed to store numbers requiring fraction or decimal, come in 3 sizes or precisions
ofloat
odouble
olong double
oAlso called real number
oValues stored is often not exact (like 2/3 in decimal, have to stop somewhere 0.666667)
oSpecial symbols, such as the dollar sign and the comma, are not permitted in real number
n5,326.25 $10.99
oMost often use double instead of float