Chapter 2 Branching and Looping


Overview
This session covers how to make your programs change their behavior based on user input. You will see how to handle user input, branch based on the values you read, and convert the results to string for display. You will also learn how to use loops to get your program to repeat the same action multiple times.

Objectives

  1. Implement conditional branching
  2. Discover and use loops in your code

Exercises
Exercise 2.1 Parsing
In this lab, you will read user input and convert it from a string to a numeric value.

Exercise 2.2 FizzBin
Here you will write a program to determine which of the first 100 integers are divisible by 3 and/or 5.

results matching ""

    No results matching ""