tailieunhanh - Lecture Introduction to computer and programming - Lecture No 3

This chapter define the term computer program, describe the use of flowcharts and pseudocode in programming, identify two ways in which a program can work toward a solution, differentiate the two main approaches to computer programming, list and describe three elements of object-oriented programming. | CSC103: Introduction to Computer and Programming Lecture 3 What is a Flowchart? A flowchart is a diagram that depicts the “flow” of a program. The figure shown here is a flowchart for the pay-calculating program START Display message “How many hours did you work?” Input Hours Display message “How much do you get paid per hour?” Input Pay Rate Multiply Hours by Pay Rate. Store result in Gross Pay. Display Gross Pay END START Display message “How many hours did you work?” Input Hours Display message “How much do you get paid per hour?” Input Pay Rate Multiply Hours by Pay Rate. Store result in Gross Pay. Display Gross Pay END Basic Flowchart Symbols Notice there are three types of symbols in this flowchart: rounded rectangles parallelograms a rectangle Each symbol represents a different type of operation. Rounded Rectangle Parallelogram Rectangle Rounded Rectangle Basic Flowchart Symbols Terminals represented by rounded rectangles indicate a starting or ending point Terminal START END Terminal START Display message “How many hours did you work?” Input Hours Display message “How much do you get paid per hour?” Input Pay Rate Multiply Hours by Pay Rate. Store result in Gross Pay. Display Gross Pay END Basic Flowchart Symbols Input/Output Operations represented by parallelograms indicate an input or output operation Display message “How many hours did you work?” Read Hours START Display message “How many hours did you work?” Input Hours Display message “How much do you get paid per hour?” Input Pay Rate Multiply Hours by Pay Rate. Store result in Gross Pay. Display Gross Pay END Input/output operations Basic Flowchart Symbols Processes represented by rectangles indicates a process such as a mathematical computation or variable assignment Multiply Hours by Pay Rate. Store result in Gross Pay. START Display message “How many hours did you work?” Input Hours Display message “How much do you get paid per hour?” Input Pay Rate Multiply Hours by Pay Rate. Store result in . | CSC103: Introduction to Computer and Programming Lecture 3 What is a Flowchart? A flowchart is a diagram that depicts the “flow” of a program. The figure shown here is a flowchart for the pay-calculating program START Display message “How many hours did you work?” Input Hours Display message “How much do you get paid per hour?” Input Pay Rate Multiply Hours by Pay Rate. Store result in Gross Pay. Display Gross Pay END START Display message “How many hours did you work?” Input Hours Display message “How much do you get paid per hour?” Input Pay Rate Multiply Hours by Pay Rate. Store result in Gross Pay. Display Gross Pay END Basic Flowchart Symbols Notice there are three types of symbols in this flowchart: rounded rectangles parallelograms a rectangle Each symbol represents a different type of operation. Rounded Rectangle Parallelogram Rectangle Rounded Rectangle Basic Flowchart Symbols Terminals represented by rounded rectangles indicate a starting or ending point Terminal START END .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.