Question: #9 Write a validation function based on the provided variables and call statement below. The validation function should return an Integer value greater than zero
#9 Write a validation function based on the provided variables and call statement below. The validation function should return an Integer value greater than zero or print an error message until an acceptable value is entered.
Declare Integer positiveValue = 0
Declare String message = "Enter the year you were born (no negative numbers!)"
positiveValue = getNumberGreaterThanZero(message)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
