C语言编程学习课件 (15).pdf
《C语言编程学习课件 (15).pdf》由会员分享,可在线阅读,更多相关《C语言编程学习课件 (15).pdf(13页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Programming In CProgramming In C Programming In CProgramming In C Practical softwares usually need to provide human-computer interaction.For example,to log in the mailbox and Facebook,you need to enter the username and password.C also has no input statements,but calls standard library functions to r
2、eceive data input from keyboard.scanfscanf()()getchargetchar()()getchgetch()()gets()gets()Programming In CProgramming In C printf()corresponds to the scanf()function,which is used to input the data from the keyboard according to the set format.getchar()corresponds to putchar()and inputs one characte
3、r from the keyboard.gtes()corresponds to puts()and receives several characters input from the keyboard until the enter key is pressed.Programming In CProgramming In C The prototype for scanf()is int scanf(const char*control_string,.);As can be seen from the syntax format and function of scanf(),it m
4、ust have at least 2 parameters.The first is a format-control string enclosed in double quotations,specifying the type and format of input data.The second parameter tells the system where the received data is loaded into memory.scanf()functions format specifiers(1)Code Meaning%a Reads a floating-poin
5、t value(C99 only).%c Reads a single character.%d Reads a decimal integer.%i Reads an integer in either decimal,octal,or hexadecimal format.%e Reads a floating-point number.%f Reads a floating-point number.scanf()functions format specifiers(2)Code Meaning%g Reads a floating-point number.%o Reads an o
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- C语言编程学习课件 15 语言 编程 学习 课件 15
限制150内