Create a new console application, and name your project P1T1 (short for Prac1 Task1). In Visual Studio you should see the following code:
Add the statements to make your program write “Hello World” on your screen.
You will need 2 lines of code – one line to put the text on the screen, and one line to ensure that the black output box does not disappear immediately.
To compile and execute your program, click on the
button.
Be sure to save your application.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace P1T1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World");
Console.ReadKey();
}
}
}
Comments
Leave a comment