Module: DISPLAY TEXT


Problem

1/5

Hello World! Displaying text on the screen

Theory Click to read/hide

Display text
Let's analyze a program that displays the phrase "Hello, world!"
using System;
class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("Hello World!");
    }
}

Let's take it in order:

using System; - The using directive includes the System namespace, which defines the entire C# standard library.

class Program {...} and static void Main() {...}  have already been explained in previous tasks.

Console.WriteLine("Hello World!"); - method that displays text in the console window. After it is executed, the cursor moves to the next line.

Problem

Change the phrase "Hello, World!" in the program to the phrase "Everybody loves kittens".