Hello All.
Im new to C and need some help.
How do u set a float point variable to print to tqo decimal places.
is it:
printf("Bla Bla Bla %f, number);
do i put say .2%f
Please Help Me
TyrioN :D :confused:
Printable View
Hello All.
Im new to C and need some help.
How do u set a float point variable to print to tqo decimal places.
is it:
printf("Bla Bla Bla %f, number);
do i put say .2%f
Please Help Me
TyrioN :D :confused:
close but you put the % then the precision then the spcifier f for the float.
this link gives more infoCode:printf("%.2f",number);
http://msdn.microsoft.com/library/de..._controlfp.asp