Let us create a console application and see how it is done. Copy the following code in the Console application.