Answer to Question #251916 in C# for Holik

Question #251916
62. Determine if the given integer is even.
1
Expert's answer
2021-10-17T16:57:17-0400
using System;
public class Program {
  public static void Main() {
    Console.Write("Input integer:");
    int i = Int32.Parse(Console.ReadLine());
    
    if ((i % 2) == 0) Console.WriteLine("Given integer is even");
    else Console.WriteLine("Given integer is odd");
  }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS