Hallo my question is lets say i have 4*0.8 that is equal to 3.2 but i want the pc to understand that this is a price and it should be written 3.20 euro for example not 3.2 euro
Printable View
Hallo my question is lets say i have 4*0.8 that is equal to 3.2 but i want the pc to understand that this is a price and it should be written 3.20 euro for example not 3.2 euro
Print as %.2f if it is a float or %.2lf if it is a double
For C++ way (using streams) please see here.