C++ dividing doesn't give the right result
I'm making a dice simulator for school, and I need to calculate the percentage a certain number has been rolled, and I gave it a test run, but somehow I got this:

    How many dice do you want to roll?
    3
    How many times do you want to roll the dice?
    1000000
    144414: 1000000 196039 %

The code for the last line is this:

    cout << sim.howManyTimesDidWeRollACertainNumber(11) << ": " << times << " " << sim.howManyTimesDidWeRollACertainNumber(11) * 100.0 / times << " %" << endl;
You would think that 144414 divided by 1000000 multiplied by 100 is 14.4414, right? How is it possible that this gives a wrong result?
C++ dividing doesn't give the right result
===

I'm making a dice simulator for school, and I need to calculate the percentage a certain number has been rolled, and I gave it a test run, but somehow I got this:

    How many dice do you want to roll?
    3
    How many times do you want to roll the dice?
    1000000
    144414: 1000000 196039 %

The code for the last line is this:

    cout << sim.howManyTimesDidWeRollACertainNumber(11) << ": " << times << " " << sim.howManyTimesDidWeRollACertainNumber(11) * 100.0 / times << " %" << endl;
You would think that 144414 divided by 1000000 multiplied by 100 is 14.4414, right? How is it possible that this gives a wrong result?