- 3
- 0
- 约1.85万字
- 约 61页
- 2017-01-01 发布于北京
- 举报
《0.C语言第3章顺序结构
* * 3.3.1 字符输入函数 函数调用的一般形式 getchar( ) 功能: 从标准输入设备(即键盘)上交互输入一个字符。 例如: getchar( ) ; c = getchar( ); printf(%c \n,getchar( )); Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd. Evaluation only. Created with Aspose.Slides for .NET 3.5 Client Profile 5.2.0.0. Copyright 2004-2011 Aspose Pty Ltd. * * 例如: 【例3.8】getchar函数的应用。 #include stdio.h void main( ) { char ch; ch=getchar( ); printf(%c %d\n,ch,ch); printf(%c %d\n\n,ch-32,ch-32); } 程序运行时输入:m 并按回车键后 输出结果是: m 109 M 77 Evaluation only. Created with Asp
原创力文档

文档评论(0)