Calculation of a bitterly assigned function with++

It's simple, but there's little trouble.
It doesn't work, it's just 0.8, it's cycling and everything.
#include <iostream> #include <stdio.h> #include <cmath> using namespace std;
int main() { setlocale(LC_ALL, "ru"); float a = 0.36, b = 0.7 , c = 0.8; for (float x = 0; x >= 0 && x <= 10; x += 0,5) { if (x <= 5) { cout << a * pow(x, 2) + b * x + c << endl; } else if (x > 5 && x <= 6) { cout << exp(x) << endl; } else if (x > 6) { cout << log(x) << endl; } } system("pause"); return 0; }

#include <iostream> #include <stdio.h> #include <cmath> using namespace std; int main() { setlocale(LC_ALL, "ru"); float a = 0.36, b = 0.7 , c = 0.8; float result; for (float x = 0; x >= 0 && x <= 10; x += 0.5) { if (x <= 5) { result = a * pow(x, 2) + b * x + c; } else if (x > 5 && x <= 6) { result = exp(x); } else if (x > 6) { result = log(x); } cout << result << endl; } system("pause"); return 0; }