I am writing a program that must find if a number is even or not. It needs to follow this template. I can get it to find if a number is even or not recursively
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This template will help. You need to fill in the commented lines. The one you have in the question won’t work – you aren’t passing anything into
isEven. This will only work ifn >= 0, otherwise it will crash your program. Easy enough to fix if you ever need to deal with negative numbers.