Computer Science, asked by iimalxo, 4 days ago

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 samarthkrv
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