0
How it gets "zero".. after 3.14
#include <stdio.h> int main() { const double PI = 3.14; printf("%f", PI); return 0; }
1 Answer
+ 4
If you don't want the zeroes then use "%.2lf" as format specifier
.2 defines 2 digits fraction
lf defines double type
More on this topic you can read from here đ
http://www.cplusplus.com/reference/cstdio/scanf/
http://www.cplusplus.com/reference/cstdio/printf/