---
title: "How can write a Console program in C# ?"  
description: "How can write a Console program in C# ?"  
author: "Anonymous User"  
published: 2018-09-17  
updated: 2018-09-17  
canonical: https://www.mindstick.com/forum/34674/how-can-write-a-console-program-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How can write a Console program in C# ?

Please give me some examples for Practices.

## Replies

### Reply by Anonymous User

Given number is Odd or Even...

![How can write a Console program in C# ?](https://www.mindstick.com/mindstickforums/6acda1ae-a5ef-4260-a0c8-f16e1356c29f/images/706dbc40-d61d-4548-8447-4df180e4c557.png)

```
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication10
{
    class Program
    {
        static void Main(string[] args)
        {
            int j;
            Console.Write("Please Enter a Number : ");
            j = int.Parse(Console.ReadLine());
            if (j % 2 == 0)
            {
                Console.Write("Entered Number is an Even Number");
                Console.Read();
            }
            else
            {
                Console.Write("Entered Number is an Odd Number");
                Console.Read();
            }
        }
    }
}
```

\


---

Original Source: https://www.mindstick.com/forum/34674/how-can-write-a-console-program-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
