csci261e f
play

CSCI261E/F Lab 3: flow control (if, if-else) September 10, 2010 ? - PowerPoint PPT Presentation

CSCI261E/F Lab 3: flow control (if, if-else) September 10, 2010 ? Review Boolean expressions get evaluated and yield true or false Boolean values are really 0 or 1 if if/else nested if statements if syntax if (condition)


  1. CSCI261E/F Lab 3: flow control (if, if-else) September 10, 2010

  2. ?

  3. Review • Boolean expressions • get evaluated and yield true or false • Boolean values are really 0 or 1 • if • if/else • nested if statements

  4. if syntax if (condition) { // do this stuff // or not at all } No semicolon. It’s a code block.

  5. if syntax if (condition) { // do one thing } else { // or the other }

  6. if syntax if (condition) { // do this thing } else if (condition2) { // or this thing } else if (condition3) { // or even this thing } else { // otherwise do this }

  7. Lab Goals • Understand the rubric for InputValidation and PaperScissorsRock • Get started with InputValidation • Get started with PaperScissorsRock

  8. Homework • Complete InputValidation • Complete PaperScissorsRock

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend