Complete the code to print "Hello, World!" using top-level statements.
Console.[1]("Hello, World!");
The Console.WriteLine method prints text to the console with a new line.
Complete the code to declare a variable and print its value using top-level statements.
int number = 5; Console.[1](number);
Console.WriteLine prints the value of the variable to the console.
Fix the error in the top-level statement that tries to read input from the user.
string name = Console.[1](); Console.WriteLine($"Hello, {name}!");
Console.ReadLine() reads a full line of input from the user as a string.
Fill both blanks to declare a variable and print a message using top-level statements.
var [1] = "C#"; Console.[2]($"Learning [1] is fun!");
The variable language holds the string, and Console.WriteLine prints the message.
Fill all three blanks to declare two variables and print their sum using top-level statements.
int [1] = 10; int [2] = 20; Console.[3]([1] + [2]);
Variables a and b hold numbers, and Console.WriteLine prints their sum.