Question: Write a script named even.sh that checks whether a given number is even. [ 4 Marks ] The script should prompt the user to input

Write a script named even.sh that checks whether a given number is even. [4 Marks]
The script should prompt the user to input the number to test.
The script should use an if/else statement for the check.
When executed, the script should print a message indicating whether the number is "even" or "odd." Note: The modulus operation (%) will return zero when the number is exactly divisible by 2.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!