Programming
2.7 Performance Assessment Using Else...If Statements
In this assessment, you will create a program that prints a message based on the number of years of service. You will design a flowchart and develop the C code for a program.
Instructions
Follow these instructions to complete your assignment:
1. Write a flowchart and C code for a program that does the following:
· Asks a user the number of years of employment service
· Uses an else...if statement to display the following messages
· Service greater than 25 years – You receive a gold watch
· Service greater than 15 but less than 25 years – You receive a silver pen
· Service greater than 5 but less than 15 years– You receive an attractive pin
· Service between 0 and 5 years – You receive a pat on the back
· Don’t forget to add curly brackets with each condition
· Feel free to use logical operators in the conditions - this is not required
2. Submit one Word document which contains:
·
· A screenshot of your code
· A screenshot of your output including the Title Bar of the console window.
3. Submit the “.c” code file, which should include a comment line with your name and the date. You should NOT save your file with a .cpp file extension.
4. Submit the Flowgorithm (.fprg) file.
Review the output below to check your work!