Question: Instructions: a . Take an integer as input. b . Your program should evaluate the input integer for the following conditions and print results based
Instructions:
a Take an integer as input.
b Your program should evaluate the input integer for the following conditions and print results based on each condition:
a Condition : Positive or Negative
If the integer is positive, print "YES". If the integer is zero or negative, print NO
b Condition : Odd or Even
If the integer is odd, print "YES". If the integer is even, print NO
c Condition : Last Digit Equals
If the last digit of the integer is print "YES". Otherwise, print NO
c You must ensure that each condition is evaluated separately and the output for each condition is printed on a new line.
d Include appropriate comments in your code to explain what each part of the program does.
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
