tailieunhanh - Lecture C++ programming: from problem analysis to program design - Chapter 2: From problem analysis to program design
Chapter 2 - From problem analysis to program design. In this chapter, you will: Become familiar with the basic components of a C++ program, including functions, special symbols, and identifiers; explore simple data types; discover how to use arithmetic operators; examine how a program evaluates arithmetic expressions; | C++ Programming: From Problem Analysis to Program Design, Fourth Edition Chapter 2: Basic Elements of C++ C++ Programming: From Problem Analysis to Program Design, Fourth Edition Objectives In this chapter, you will: Become familiar with the basic components of a C++ program, including functions, special symbols, and identifiers Explore simple data types Discover how to use arithmetic operators Examine how a program evaluates arithmetic expressions C++ Programming: From Problem Analysis to Program Design, Fourth Edition Objectives (continued) Learn what an assignment statement is and what it does Become familiar with the string data type Discover how to input data into memory using input statements Become familiar with the use of increment and decrement operators Examine ways to output results using output statements C++ Programming: From Problem Analysis to Program Design, Fourth Edition Objectives (continued) Learn how to use preprocessor directives and why they are . | C++ Programming: From Problem Analysis to Program Design, Fourth Edition Chapter 2: Basic Elements of C++ C++ Programming: From Problem Analysis to Program Design, Fourth Edition Objectives In this chapter, you will: Become familiar with the basic components of a C++ program, including functions, special symbols, and identifiers Explore simple data types Discover how to use arithmetic operators Examine how a program evaluates arithmetic expressions C++ Programming: From Problem Analysis to Program Design, Fourth Edition Objectives (continued) Learn what an assignment statement is and what it does Become familiar with the string data type Discover how to input data into memory using input statements Become familiar with the use of increment and decrement operators Examine ways to output results using output statements C++ Programming: From Problem Analysis to Program Design, Fourth Edition Objectives (continued) Learn how to use preprocessor directives and why they are necessary Explore how to properly structure a program, including using comments to document a program Learn how to write a C++ program C++ Programming: From Problem Analysis to Program Design, Fourth Edition The Basics of a C++ Program Function: collection of statements; when executed, accomplishes something May be predefined or standard Syntax: rules that specify which statements (instructions) are legal Programming language: a set of rules, symbols, and special words Semantic rule: meaning of the instruction C++ Programming: From Problem Analysis to Program Design, Fourth Edition Comments Comments are for the reader, not the compiler Two types: Single line // This is a C++ program. It prints the sentence: // Welcome to C++ Programming. Multiple line /* You can include comments that can occupy several lines. */ C++ Programming: From Problem Analysis to Program Design, Fourth Edition Special Symbols Special symbols + - * / . ; ? , = C++ Programming: From Problem .
đang nạp các trang xem trước