If i run:

Code:
#include <iostream>

using namespace std;

int main()

{

for (float x = 0; x < 10; x+=0.1 ) {
    cout<< x <<endl;
    
    
}
    cin.get();
    
    
}
It works fine until it gets to 7.7 then it runs:

7.5
7.6
7.7
7.79999
7.89999
7.99999
8.09999
8.2
8.3

Can anyone explain to me what the problem is?
As you can see I'm just getting started.

Thank you