I want to subtract from this number and make the output in string, but I want to remove these zeros
When I print the number in float, these zeros disappear.
int main(){
    string money = "5000";
    float r = atof(money.c_str()) - 1000;
    cout << r << endl;
    cout << to_string(r);
    return 0;
}
this is the output:
4000
4000.000000
