>.> In lamens terms ffs
You have four condition if statements. This says, if this condition is met, do this, else, if this other condition is met, do this, else if this condition is met, do this, else, if this condition is met, do this.
Another way you can try this is to make the conditions check to see if the an age is under the requirements only so once the first condition is met, the others won't be executed.
1 2 3 4
|
if (age < 5) printf("\n\nToo young for school");
else if (age <= 16) printf("\n\nStill at school");
else if (age <= 59) printf("\n\nGo to work!");
else if (age > 59) printf("\n\nTime to retire."); //This is an exception since you don't have any conditions after this.
|
This is really simple code. Try not to over-complicate it too much as it is, after all, self explanatory. The if statements require a condition to be met in order to execute its body and an else if statement requires the previous condition to fail in order for its condition statement to be tried.
The conditions themselves are just comparisons, commonly used in math (or similar to). >= means greater than or equal too, <= means less than or equal too.
Or did I miss the point...