正在加载图片...
The C Programming language Chapter 4 Input and Output ☆ Input separators White space characters(blank, tab, newline.) Literal characters can appear in the scanf format string they must mach the same characters in the input 例sean(od%d"&a&b)&s) 例 scanf(a=%d,b-%d,c-%d”,&a,&b,&c); 输入a=12,b=24,c=36The C Programming Language Chapter 4 Input and Output ❖Input separators – White space characters (blank , tab , newline …) – Literal characters can appear in the scanf format string ;they must mach the same characters in the input. 例 scanf(“%d%o%x”,&a,&b,&c); printf(“a=%d,b=%d,c=%d\n”,a,b,c); 输入 123 123 123 输出 a=123,b=83,c=291 例 scanf(“%d:%d:%d”,&h,&m,&s); 输入 12:30:45 则12 h, 30 m, 45 s 例 scanf(“%d,%d”,&a,&b) 输入 3,4  则3a, 4 b 例 scanf(“a=%d,b=%d,c=%d”,&a,&b,&c); 输入 a=12,b=24,c=36 
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有