[SOLVED] CS150 Labs 4/5- If/Else If/Else

35.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

• Draw a flowchart for the following program, then code it (making changes later is fine).
• Include a through list of test cases with your flowchart that test all branches of it.
• HIGHLY ADVISED TO TEST LAB 4 ON PAPER/FLOWCHART BEFORE CONTINUING TO LAB 5, AND HAVE IT CHECKED IF IN THE “LIVE” SESSION AT THE TIME.
• Create a program that asks the user to enter an integer.
• If it is even:
• Print whether or not it is divisible by both 5 and 3 (i.e. “Is div. by 5&3” or “Isn’t div. by 5&3).
• If it is odd:
• Print whether or not it is negative
• Whether it is even or odd print whether it is between -100 and 100 inclusive (-100 and 100 are in the range).
• Note: Zero is even and is not negative.
• Your program must correspond to your flowchart (Lab 5)
• You will receive credit for Lab 4 with a correct flowchart, and for Lab 5 with a working program that corresponds to your flowchart.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.