Challenge: Variable Declaration
Complete the code by declaring the variables value_1
and value_2
having values 10
and 20
respectively.
main.cs
12345678910111213141516namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Write code below this line // Write code above this line System.Console.WriteLine("Value 1: " + value_1); System.Console.WriteLine("Value 2: " + value_2); } } }
- Use the
var
keyword and the assignment operator (=
) for variable declaration.
main.cs
1234567891011121314151617namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Write code below this line var value_1 = 10; var value_2 = 20; // Write code above this line System.Console.WriteLine("Value 1: " + value_1); System.Console.WriteLine("Value 2: " + value_2); } } }
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 9
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Suggested prompts:
Can you show me how to declare the variables using the var keyword?
What is the correct syntax for assigning values to variables in JavaScript?
Can you provide an example of declaring and assigning these variables?
Awesome!
Completion rate improved to 1.59
Challenge: Variable Declaration
Veeg om het menu te tonen
Complete the code by declaring the variables value_1
and value_2
having values 10
and 20
respectively.
main.cs
12345678910111213141516namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Write code below this line // Write code above this line System.Console.WriteLine("Value 1: " + value_1); System.Console.WriteLine("Value 2: " + value_2); } } }
- Use the
var
keyword and the assignment operator (=
) for variable declaration.
main.cs
1234567891011121314151617namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Write code below this line var value_1 = 10; var value_2 = 20; // Write code above this line System.Console.WriteLine("Value 1: " + value_1); System.Console.WriteLine("Value 2: " + value_2); } } }
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 9