Input and output of real data double and float

Call the functions scanf() and printf() to realize the input and output of real data

When outputting a floating-point number, use the same format specifiers %f and %e for single precision and double precision; when inputting a floating-point number, the format specifiers %f and %e can be used in common, but when inputting a double type, the format control specifier must be added with a qualifier l. Use %lf to input, you can use %f/%lf to output float can only use %f to input, you can use %f/
% lf to output
insert image description here

insert image description here


insert image description here

insert image description here

Guess you like

Origin blog.csdn.net/qq_42580901/article/details/109705607