C语言程序设计基础 马华 李玉娟 第2章 基本c语言-2新.pptVIP

  • 3
  • 0
  • 约 40页
  • 2015-12-15 发布于广东
  • 举报

C语言程序设计基础 马华 李玉娟 第2章 基本c语言-2新.ppt

字符 说明 用于输入长整型数据(可用%ld, %lo, %lx), 以及double型数据(用%lf或%le)。 用于输入短整型数据(可用%hd, %ho, %hx)。 指定输入数据所占宽度(列数)。 表示本输入项在读入后不赋给相应的变量。 h 域宽(为一正整数) * l #include stdio.h int main(void) { int int_i,int_j; float float_f; double double_d; char ch; printf(Please input 2 integer:\n); scanf(%d%d,int_i,int_j); printf(Please input 1 float:\n); scanf(%f,float_f); printf(Please input 1 double:\n); scanf(%lf,double_d); printf(Please input 1 character:\n); scanf(%*c%c,ch); printf(int_i=%d\tint_j=%d\n,int_i,int_j); printf(float_f=%f\tdouble_d=%f\n,float_f,double_d); printf(ch=%c\n,ch); return 0; } 2.4.1 逗号

文档评论(0)

1亿VIP精品文档

相关文档