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

Tài liệu Chapter 5 Quick Reference pdf

1 268 0
Tài liệu được quét OCR, nội dung có thể không chính xác
Tài liệu đã được kiểm tra trùng lặp

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

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Chapter 5 Quick Reference
Thể loại Chapter
Định dạng
Số trang 1
Dung lượng 6,51 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Chapter 5 Quick Reference To Add an amount to a variable Subtract an amount from a variable Run one or more statements while a condition is true Repeatedly execute statements one or

Trang 1

Chapter 5 Quick Reference

To

Add an amount to a variable

Subtract an amount from a variable

Run one or more statements while a

condition is true

Repeatedly execute statements one or

more times

Do this

Use the compound addition operator For example:

variable += amount;

Use the compound subtraction operator For example:

variable -= amount;

Use a while statement For example:

inti=0;

while G != 10)

{

Console WriteLine(i);

i++;

}

Alternatively, use a for statement For example:

for Gnt 1 = 0; 1 != 10; 1++)

{

Console WriteLine(i);

} Use a do statement For example:

inti=0;

do

{

Console WriteLine(i);

i++;

}

while G != 10);

Ngày đăng: 21/01/2014, 15:20

TỪ KHÓA LIÊN QUAN

w