printf

ouble型,printf()用%f输出,而scanf用%lf来接受输入。

 

格式

printf

scanf

%c

int

char *

%d, %i

int

int *

%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


 
posted on 2017-09-27 16:39  莫水千流  阅读(389)  评论(0编辑  收藏  举报