IHYPRESS.NET > C PROGRAMMING
> 03. Selection Structures
- A simple if statement
A program that asks the user for a temperature and displays a different message if the temperature is above or below 20 degrees.
- The traffic light program (nested ifs)
A program that displays the recommended actions depending on the color of a traffic light. This program uses nested if statements.
- The traffic light program (switch)
A program that displays the recommended actions depending on the color of a traffic light. Unlike the previous program, this implementation uses the switch statement.
- Even vs. odd
A program that determines if an integer number is odd or even.
COPYRIGHT © 2020 IHYPRESS.NET. A DIVISION OF IHY PRESS, KIRKLAND, WA 98083 USA. ALL RIGHTS RESERVED.