[C language] scanf () input floating-point data

#include <stdio.h>
 int main () 
{ 
    Double X1, X2, X3, X4; 
    the printf ( " Enter two floating-point numbers X1, X2: \ n- " ); 
    scanf_s ( " % LF, LF% " , & X1, & X2); 
    the printf ( " % LF,% LF \ n- " , X1, X2); 
    the printf ( " enter a float X3, X4: \ n- " ); 
    scanf_s ( " % 5Lf,% LF " , & X3, & X4 ); 
    the printf ( " % LF, LF% \ n- " );
     return  0 ; 
 

}

 

Guess you like

Origin www.cnblogs.com/HGNET/p/11827979.html