I\'ve coded using float variables before and never had this problem.
float a, b, subtotal, stx; a=15.95; b=24.95; subtotal=a+b; stx=subtotal*.07; cout <
From standard 2.14.4
The type of a floating literal is double unless explicitly specified by a suffix.
(emphasis mine)