Opposite sign

Report a typo

Read an integer as input. Change the sign of this input integer (i.e., make it negative if it was positive, or positive if it was negative). Note that zero remains unchanged when its sign is changed.

Then, print two lines of output:

  1. The input integer with its sign changed

  2. One of the following messages:
    - The number is negative if the resulting number is less than zero
    - The number is positive if the resulting number is zero or greater

For example, if the input is -11, changing the sign makes it 11, which is a positive integer, and the result will look as follows:

11
The number is positive

Sample Input 1:

567

Sample Output 1:

-567
The number is negative
Write a program in Python 3
# put your code here
___

Create a free account to access the full topic