Challenge 1: Check If Even or Odd
Problem Statement
Write a code which will check whether _a
given integer number is even or odd. If the number is even print “Number a is even” and if it’s an odd print “Number a is odd”.
Input
integer
Output
Number a is even or Number a is odd
Where a is the number given as input.
Sample Input
3
Sample Output
Number 3 is odd
Coding Exercise
It is recommended that you try solving the exercise yourself before viewing the solution.
fn test(_a:i32) {
// Write code here
}
Good luck!🤞