Question: In this program, you will be reading in an integer and measuring its parity ( even or odd ) and sign. First, you will test
In this program, you will be reading in an integer and measuring its parity even or odd and sign.
First, you will test the parity of the number, outputting either "even" or "odd".
Next, you will output the sign of the integer, outputting either "positive", "negative", or "zero" for zero.
As always, terminate the program output with a new line character, and submit your code within a class named Program
Sample Test Cases
You can test your program by copying an entire input sample and pasting it into the console. If the output does not exactly match the example output, there is an error in your code.
tableInputOutputtableevenpositivetableoddpositivetableevennegativetableoddnegativetableevenzero
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
