GNU/Linux Programmer's Solver
Chapter 2 - Conditionals

Conditionals are the may way to add logic to your programs.
PROGRAMMING HELLO WORLD
In this chapter we'll explore how to build conditional expressions and modify program flow based on then, effectively being able to add logic to our programs

To explore conditionals we'll use the classical Guess a number program which we'll implement using all the programming languages.

This simple program will teach us quite some stuff. In first place we'll learn how to read data from the user. Then we'll learn how to use variables and expressions to create conditions and make our programs do different things depending on those conditions.

Finally, from a programming language point of view, we'll learn how to use the if-else and switch constructions that every language provides in a way or another, as well as how to declare constants in each languages.

Let's get to the code:

Related Posts

GNU/Linux Programmer's Solver - Introduction

Programming exercises in 18 Programming Languages

Read

linuxprogramming

GNU/Linux Programmer's Solver - Conditionals in Perl

Guess program in Perl. Conditionals, if, switch and constants

Read

PROGRAMMING GUESS Perl

Return to Home Page