Nested For-loops - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Nested For-loops

Description:

The do-statement The do-statement (1) The do-statement is different from the while-statement and the for-statement in that: The do-statement makes the ... – PowerPoint PPT presentation

Number of Views:85
Avg rating:3.0/5.0
Slides: 10
Provided by: chen70
Category:
Tags: loops | nested

less

Transcript and Presenter's Notes

Title: Nested For-loops


1
The do-statement
2
The do-statement (1)
  • The do-statement is different from
    the while-statement and the for-statement in
    that
  • The do-statement makes the continuation
    test after executing
  • the statements in the body

3
The do-statement (2)
  • The keyword do announces (to the Java compiler)
    that we started an do-statement
  • Following the keyword do, you can write
    (only) one statement
  • The keyword while and a conditional
    clause ( LOOP-CONTINUATION-CONDITION ) follow
    the body

4
Flow chart
5
Example (1)
6
Example (2)
7
Re-writing a do-statement using a while-statement
8
Coordinate system of a Canvas
9
Coordinate system of a Canvas
Write a Comment
User Comments (0)
About PowerShow.com