Write a method named isEven that accepts an int argument. The method should return true if the argument is even, or false otherwise. Also write a program to test your method
Answers
Answered by
0
Answer:
#include<stdio.h>
#include<conio.h>
int main()
{
int evenOdd;
printf("Enter a number:");
scanf("%i" , &evenOdd);
if(evenOdd%2==0)
printf("The number is even");
else
printf("The number is odd");
getch();
return 0;
}
Explanation:
Similar questions