Starting from:

$34.99

CS150 If/Else If/Else (Labs 4/5 - Work in Pairs) Solution

• 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.

More products