General Functions Cont’d
Example:- A program that converts temperature from degrees Fahrenheit to degrees Celsius and visa-versa.
Main Menu:
1. Convert Celsius to Fahrenheit.
2. Convert Fahrenheit to Celsius.
NOTE: Options 1 & 2 can both be written as functions in your program, and each function performs a different action.
- Using option 1 will take the input in degrees Celsius and will output the result in Fahrenheit.
- Option 2 does just the opposite.