Check out example codes for "odd or even in c#". It will help you in understanding the concepts better.

Code Example 1

if(num %2 == 0){
  Console.WriteLine("Number is even")
}else{
  Console.WriteLine("Number is odd")
}

Learn ReactJs, React Native from akashmittal.com