Introduction to C programming. A practical approach. by Vicente Garcia Enrique

Introduction to C programming. A practical approach. by Vicente Garcia Enrique

Author:Vicente Garcia, Enrique [Vicente Garcia, Enrique]
Language: eng
Format: epub
Publisher: Enrique Vicente
Published: 2020-06-26T16:00:00+00:00


int age

age = 26;

if (age <20)

printf ("age less than 20 ...");

if (age> = 20)

printf ("older age 20 ...");

The if - else statement

Same as the if statement but if the expression to evaluate is missing, the elseblock is executed

Eg.

Another way to code the previous example is with the if-else statement

int age

age = 26;

if (age <20)

printf ("age less than 20 ...");

else

printf ("older age 20 ...");

You can put several lines of code in the if or else enclosing it between {}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.