1. Trang chủ
  2. » Công Nghệ Thông Tin

Lecture An introduction to computer science using java (2nd Edition): Chapter 6 - S.N. Kamin, D. Mickunas, E. Reingold

20 36 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 20
Dung lượng 228,19 KB

Nội dung

Chapter 6 - Iteration. In this chapter we will: discuss the use of repetition (iteration) in programming algorithms; describe the Java while, for, and do-while statements; demonstrate the use of loop invariants to verify the correctness of loops; show the use of loops in data entry and computer animation.

Chapter Iteration Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N Kamin, D Mickunas, E Reingold     Chapter Preview In this chapter we will: • discuss the use of repetition (iteration) in programming algorithms • describe the Java while, for, and do-while statements • demonstrate the use of loop invariants to verify the correctness of loops • show the use of loops in data entry and computer animation     while Loop • Repeated executes body of the loop which can be a single or compound statement • A while loop will execute as long as its condition is true • An infinite loop will occur if the condition never becomes false • Example:   count = 1; while (count

Ngày đăng: 15/05/2020, 23:05

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN