Lecture 3 Decision Control Structure
Lecture 3 Decision Control Structure
Programming Fundamental
Decision control structure
Before this we have used sequence control
structure in which,
Various steps are executed sequentially, i.e. in the
same order in which they appear in the program.
By default the instructions in a program are executed
sequentially.
C is WOW
}
No Error, a and b are equal
No Error
No Error
No Error
Problem
A company insures its drivers in the following cases:
If the driver is married.
If the driver is unmarried, male & above 30 years of age.
If the driver is unmarried, female & above 25 years of age.
In all other cases the driver is not insured. If the
marital status, sex and age of the driver are the
inputs.
Write a program to determine whether the driver is
to be insured or not?
Equivalent to