Programming
2.2 Guided PracticeUse an "If" Statement to Decide if a Value is Odd or Even
The following program uses a decision structure to decide if a user-entered value is odd or even You ask the user to enter a number and, if the value is divisible by 2 without a remainder, then the value is even. If the value has a remainder after dividing it by 2, then the value is odd. When the condition reigns true, a message is displayed stating the value is even. When the condition is false, the else clause is executed, and another message is displayed stating that the value is odd.
Instructions
Follow these instructions to complete your assignment:
1. Use Flowgorithm to create the flowchart in the tab below.
2. Select the Code tab, and enter the code into your compiler.
3. Compile your code and run. Your output should match the image on the Output tab.
4. Paste your flowchart and a screenshot of your output (including the Title Bar showing the path and name of your code) into a Word document (.docx).
5. Submit the “.c” code file, which should include a comment line with your name and the date.
6. Submit the Flowgorithm (.fprg) file.
7. Save your files, and upload them using the instructions below.
· Code
· Output
New flowchart shape: The diamond shape is used for making decisions.
FLOWCHART