double型(雙精度型)的打印(printf) 和scanf

ouble型,printf()用%f輸出,而scanf用%lf來接受輸入。spa

 

格式ci

printftable

scanffloat

%ctop

inttab

char *di

%d, %ivoid

intprintf

int *ab

%o, %u, %x

unsigned int

unsigned int *

格式

printf

scanf

%ld, %li

long int

long int *

%lo, %lu, %lx

unsinged long int

unsigned long int *

%hd, %hi

int

short int *

%ho, %hu, %hx

unsigned int

unsigned short int *

%e, %f, %g

double

float *

%le, %lf, %lg

n/a

double *

%s

char *

char *

%[...]

n/a

char *

%p

void

void **

%n

int *

int *

%%

none

none

相關文章
相關標籤/搜索