Rabu, 05 November 2008

Selection

Generally all programming language has selection in to writting the program. Selection means in the program we select it into two posibility or more. In selection we use statement if and else.

Example:
if (age >= 17)
display "adult"
else
display "child"

In this case the program will be display "adult" if the age of people is greater than or equals to 17, and it will be display "child" if the age of people is less than 17.

Tidak ada komentar: