【Java精品源码栏目提醒】:网学会员鉴于大家对Java精品源码十分关注,论文会员在此为大家搜集整理了“【精品】哈工大程序设计课件Chap02_tutorial_introduction - 大学课件”一文,供大家参考学习
A Tutorial Introduction C Programming Language Li Hanjing Contents The rule of learning Hello World The structure of a C program Basic elements in C2013-9-12 conference a ready man -- Bacon 2 Of Studies Rule The only way to learn a new programming language is by writing programs in it.2013-9-12 conference a ready man -- Bacon 3 Of Studies Hello world/print “Hello World” in screen/includemain printfHello Worldn2013-9-12 conference a ready man -- Bacon 4 Of Studies Hello World/print “Hello World” in screen/ Comment 注释include Include information about standard library Main function主 文件包含main 函数 Body 程序块 printfHello Worldn Arguments Library function库 函数 函数参数 e12013-9-12 conference a ready man -- Bacon 5 Of Studies What is a C Program Simple Amazing2013-9-12 conference a ready man -- Bacon 6 Of Studies Elements in Hello world stdio.h – standard input/output library . head file printf is one of libraryfunctionsinclude Preprocesser instruction2013-9-12 conference a ready man -- Bacon 7 Of Studies A library function Semicolon printfHello Worldn Argument 参数 The new lineFunction character name The output or 函数名 character string Carriage return and line feed Double quote 回车换行 双引号 blog.CSDN.net Parenthesis 括弧 e2 2013-9-12 conference a ready man -- Bacon 8 Of Studies Main function main is special Your program begins executing at the beginning of main Every program must have a main somewhere main printfHello Worldn 2013-9-12 conference a ready man -- Bacon 9 Of Studies Communication between functions main and prinf are all functions so how do they connect with each other/print “Hello World” in screen/include The argument list is one ofmain ways to communicate data between functions printfHello Worldn2013-9-12 conference a ready man -- Bacon 10 Of Studies The escape sequence 转义字符 n An escape sequence provides a general and extensible mechanism for representing hard-to-type or invisible characters. t ” e32013-9-12 conference a ready man -- Bacon 11 Of Studies Printing the table of F and C equ. formula: C5/9F-32 Fahrenheit Centigrade Celsius2013-9-12 conference a ready man -- Bacon 12 Of Studies – resolve problems. Step one is to – formalize a problem into a computable problem – and to get the executable computational process. Step two is to – learn a programming language – and to write the process into code – And to run it on the machine.2013-9-12 conference a ready man -- Bacon 13 Of Studiesinclude/ print Fahrenheit-Celsius table for fahr 0 20 ... 300 /main int fahr celsius int lower upper step lower 0 / lower limit of temperature table/ upper 300 / upper limit / step 20 / step size/ fahr lower while fahr