CS161_Topic#8

CS161_Topic#8 - 1 CS161 CS161 Introduction to Introduction...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 CS161 CS161 Introduction to Introduction to Computer Science Computer Science Topic #8 CS161 Topic #8 2 Today in CS161 Review for Midterm Variable Definitions Conditional Expressions (if, else) Loops (while, do while, for) Sample Questions Switch Statements Questions? CS161 Topic #8 3 Review for Midterm The midterm is a closed book and closed notes exam There will be questions asking you to determine the output of a program, indicate what is wrong with a program, evaluate conditional expressions, and write program fragments. CS161 Topic #8 4 Understand these concepts: The difference between designing an algorithm and implementing C++ code. The basic data types: int, float, and char. The difference between dividing integers versus floating point numbers. The if/else control structures. The difference between relational operators, equality operators, and logical operators. The while, do-while, for loops CS161 Topic #8 5 Understand these concepts: What does a loop allow us to do? Where do we put loops in our program? What is a C++ statement? How do you read information from the keyboard? How do you write information to the screen? Why would you use a while loop rather than a do- while loop? CS161 Topic #8 6 Sample Questions: The following is supposed to output all positive odd numbers less than 10. It contains some errors. What are they and how can they be corrected?...
View Full Document

Page1 / 21

CS161_Topic#8 - 1 CS161 CS161 Introduction to Introduction...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online