mirror of
https://github.com/GnoConsortium/gno.git
synced 2024-12-30 04:33:01 +00:00
test more floating point data formats in printf
This commit is contained in:
parent
b998993162
commit
07177f48d1
@ -3,6 +3,10 @@
|
||||
int main(void) {
|
||||
double pi = 3.141596;
|
||||
|
||||
printf("pi is %f\n", pi);
|
||||
printf("(f) pi is %f\n", pi);
|
||||
printf("(e) pi is %e\n", pi);
|
||||
printf("(g) pi is %g\n", pi);
|
||||
printf("(.2g) pi is %.2g\n", pi);
|
||||
printf("(.2g) pi is %.2g\n", pi / 1024. );
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user