// Explore multiplication #include using namespace std; int main() { { double y = 0.1 ; double z = 0.01 ; double w = y*z ; double a = 0.001 ; if ( w == a ) { cout << "0.1*0.01 == 0.001" << endl ; } else { cout << "No" << endl ; } cout << " The difference w-a is " ; cout << (w-a) << endl ; } cout << endl; { double y = 0.1 ; double z = 0.1 ; double w = y*z ; double a = 0.01 ; if ( w == a ) { cout << "0.1*0.1 == 0.01" << endl ; } else { cout << "No, 0.1*0.1 != 0.01" << endl ; cout << " in fact.... " ; if ( w < a ) { cout << "0.1*0.1 < 0.01" << endl ; } else { cout << "0.1*0.1 > 0.01" << endl ; } cout << " The difference w-a is " ; cout << (w-a) << endl ; } } }