TAILIEUCHUNG - C Programming for the Absolute Beginner phần 4

Tham khảo tài liệu 'c programming for the absolute beginner phần 4', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 4 Looping Structures in flowcharts by looking at the program flow. If you see connector lines that loop back to the beginning of a condition diamond symbol you know that the condition represents a loop. In this example the program flow moves in a circular pattern. If the condition is true employee payroll is processed and program control moves back to the beginning of the original condition. Only if the condition is false does the program flow terminate. Take a look at the next set of pseudo code which is implemented as a flowchart in Figure . while end-of-file false if pay-type salary then pay salary else pay hours rate end If loop Figure Flowchart demonstrating a looping structure with inner condition. In Figure you see that the first diamond symbol is really a loop s condition because program flow loops back to its beginning. Inside of the loop however is another diamond which is not a loop. The inner diamond does not contain program control that loops back to its origin. Rather the inner diamond s program flow moves back to the loop s condition regardless of its outcome. C Programming for the Absolute Beginner Second Edition Let s take another look at a previous pseudo code example the flowchart is shown in Figure which moves the condition to the end of the loop. do display menu while user-selection quit figure Moving a loop s condition to the end of the loop. Remember The program flow holds the key. Because the loop s condition in Figure is at the end of the loop the first process in the flowchart is displaying the menu. After displaying the menu the loop s condition is encountered and evaluated. If the loop s condition is true the program flow loops back to the first process if false the program flow terminates. The final component to building looping algorithms with flowcharts is demonstrating nested loops. Take another look at the nested loop pseudo code from the previous section. do display menu If user-selection payroll then

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.