Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- float a = 12.345;
- double b = 12345.1234567;
- long double c = 1234567.1234567;
- printf("%f\n%f\n%Lf\n\n", a, b, c);
- printf("%.7f\n%.7Lf\n", b, c);
- return 0;
- }
- /*
- output:
- 12.345000
- 12345.123457
- 1234567.123457
- 12345.1234567
- 1234567.1234567
- */
Advertisement
Add Comment
Please, Sign In to add comment