That is, no semi-colon at the end of the if line, braces are required if more than one conditional action is required, and all conditional actions should be indented. A Program to convert percentages into grades. Uses simple if statements. The if-else construct. Very similar to the above except one of two sets of actions can be performed depending on whether the condition is met or not.
Similar rules apply to braces, semi-colons and indentation.
Nested if statements. When this occurs, you must be sure to use the correct indentation. Failure to do so can make understanding a program very difficult to follow. A Program to convert percentages into grades. Sometimes a task may require a host of actions to be performed depending on many specific conditions.