Print the number entered by user only if the number entered is negative

Print the number entered by user only if the number entered is negative

Implementation: