C语言编程学习课件 (14).pdf
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《C语言编程学习课件 (14).pdf》由会员分享,可在线阅读,更多相关《C语言编程学习课件 (14).pdf(15页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、Programming In CProgramming In C Programming In CProgramming In C According to the five characteristics of the algorithm,a complete program must have output.The default standard output device is the displayer.There is no output statement in C,so it needs to call the output function in the standard l
2、ibrary function to display data and information.Common output functions are:printf(),putchar(),puts().These library functions used in a program need to include the header file stdio.h.Programming In CProgramming In C The prototype for printf()is int printf(const char*control_string,.);printf(“a=%4d,
3、b=%.2fn“,10 ,3.5);“a=10,b=3.50n”Programming In CProgramming In C printf(“The total of 6 and 5 is%d.”,6+5);printf()function allows to expression and display the results.%d:control string.output a integer expression Code Format%a Hexadecimal output in the form 0 xh.hhhhp+d(C99 only).%A Hexadecimal out
4、put in the form 0Xh.hhhhP+d(C99 only).%c Character.%d Signed decimal integers.%i Signed decimal integers.%e Scientific notation(lowercase e).%E Scientific notation(uppercase E).%f Decimal floating point.printf()functions format specifiers(1)printf()functions format specifiers(2)Code Format%g Uses%e
5、or%f,whichever is shorter.%G Uses%E or%F,whichever is shorter.%o Unsigned octal.%s String of characters.%u Unsigned decimal integers.%x Unsigned hexadecimal(lowercase letters).%X Unsigned hexadecimal(uppercase letters).%p Displays a pointer.The Minimum Field Width Specifier Program 1.16#include int
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- C语言编程学习课件 14 语言 编程 学习 课件 14
![提示](https://www.deliwenku.com/images/bang_tan.gif)
限制150内