HW12
COP-3223H
Setup
See HW7's Setup for how to prepare for performing and submitting your homework.
Homework file names
- hw10-1.c
- hw10-2.c
Questions
In this exercise, you will create three programs that do the same thing:
- Input: one integer x
- Output:
"yes\n"when x is both even and positive"no\n"otherwise
- (
hw12-1.c) For the first program, use a single if-then-else statement and a Boolean operation to implement the program. - (
hw12-2.c) For the second program, use only two if statements (not if-then-else) and Boolean operations to implementation the program. - (
hw12-3.c) For the third program, use only if statements (not if-then-else) and no Boolean operations. It is possible to use four if statements (with nesting).
Submit via git.
Submission
See HW7's Submission instructions for adding, committing, and pushing your homework to the assignments' repo.
Self-check
See HW7's Self-check for instructions on checking what you have submitted to the remote grading repository.