Programming

profileAdejoke
Wk1_GuidedPractice_CreatingaFlowchartandCprogramUsingIfstatements1.docx

Guided Practice: Creating a Flowchart and C Program Using an if() Statement

Program Description: Compute a user’s weekly pay and display a message if the weekly pay is more than $1000.

Create the flowchart below using Flowgorithm:

New Flowchart Item: You will use the diamond shape to make the decision if the weekly pay is more than $1000 which will be the condition.

Diagram  Description automatically generated

Now, let’s create the matching C program.

New syntax items: An if statement allows us to make decisions and if the condition is true other commands can be executed.

Graphical user interface, text  Description automatically generated

Here is what the output will look like:

Text  Description automatically generated

Run your program. Take a screenshot of the output screen.

Upload your Flowgorithm .fprg, .c source file, and a screenshot of the C output screen into the course dropbox for grading.

image1.png

image2.png

image3.png