Introduction to Computer Science n Instructor n n





















- Slides: 21
Introduction to Computer Science n Instructor: n n Dr. Quincy Wu (solomon@ncnu. edu. tw) e-Textbook: n Bharat Kinariwala and Tep Dobry, "Programming in C", Published by University of Hawaii at Manoi, 1993. n n http: //ee. hawaii. edu/~tep/EE 160/Book/PDF/Book. html Evaluation: n n n Exercise (30%) Midterm Exam (35%) Final Exam (35%) C Programming Try to earn bonus! 1
Program Power n n n Software (programs) rule the hardware (the physical machine). The process of creating this software is called programming. Why learn to program? n n Fundamental part of computer science Having an understanding of programming helps you have an understanding of the strengths and limitations of computers. C Programming 2
Not Only Learn, But Also Use n Computers are powerful in n n Computation Data Storage Communication Try to solve problems around you. n n Improve efficiency Reduce cost C Programming 3
X + Y 愛的方程式 (A Beautiful Young Mind) n NCNU Library has the DVD of this movie, but only with Chinese subtitle. C Programming 4
Open. Subtitle. org C Programming 5
Do you notice the problem? C Programming 6
Sequence number Format of SRT Subtitles to display 1 00: 27, 102 --> 00: 29, 484 - (THUNDER RUMBLING) - (RAIN POURING) Start Time End Time A space line for separation 2 00: 49, 685 --> 00: 52, 470 NATHAN: I find any communication 3 00: 52, 602 --> 00: 56, 110 of a non-mathematical nature very difficult. 4 00: 58, 351 --> 00: 01: 02, 677 Because I don't talk much, people think I don't have anything to say, 7
Shift the time by +5 seconds 1 00: 32, 102 --> 00: 34, 484 - (THUNDER RUMBLING) - (RAIN POURING) 2 00: 54, 685 --> 00: 57, 470 NATHAN: I find any communication 3 00: 57, 602 --> 00: 01, 110 of a non-mathematical nature very difficult. 4 00: 01: 03, 351 --> 00: 01: 07, 677 Because I don't talk much, people think I don't have anything to say, 8
Now it looks better C Programming 9
Huge amount of trivial work! n You can certainly do this manually, but n n There are 1430 subtitles to modify. You need to be careful in computing n n n If you edit the SRT file manually, n n n 00: 01: 57 + 5 sec 00: 02 00: 59 + 5 sec 01: 00: 04 It takes a long time, probably longer than 1 hour. It is error-prone. Leave these trivial tasks to computers! C Programming 10
Programming Languages n Natural language has ambiguity and imprecision problems when used to describe complex algorithms. n I saw the man in the park with the telescope. 某打字機廣告【不打不相識】 n 台北市羅斯福路藝品畫廊【有畫好說】 Programs expressed in an unambiguous , precise way using programming languages. n n Every structure in programming language has a precise form, called its syntax Every structure in programming language has a precise meaning, called its semantics. C Programming 11
Your Wording Must Be Precise Expecto Patronum! C Programming 12
Spend 6 + 3 Hours in a Week n Before a class n n n Reading - textbook, online articles Watch videos Three-hour class n Writing programs Before you come to the classroom, bring a question. C Programming 14
A Few Suggestions n n n Take notes Think about it. Practice again. Teach it. Identify your weakness and try to improve. C Programming 15
Visual Studio 2017 C Programming 16
Development Setting: C Programming 17
Start a new project n File – New – Project n n n Empty Project Name: test Add – New Item … n Name: test. cpp C Programming 18
Try a simple program C Programming 19
Where is the output? n n Q: When I press Ctrl-F 5 to run my application, the console window pops up, the program output appears and then the window quickly closes as the application exits. This makes it difficult for me to see the output. How can I prevent the window from closing immediately? A: Alt-F 7 Configuration Properties / Linker / System. Set "Subsystem" to "Console". C Programming 20
請這幾位同學下課後來找我 n n n s 107321016 林彥甫 s 107321036 楊燿宇 s 107321048 林育如 C Programming 21