Challenge: Declaring Explicitly Typed Variables
- Declare a variable called
bigValue
of type unsigned long. Initiate it with a value of123456789
. - Declare a variable called
smallValue
of type integer. Initiate it with a value of1234
.
main.cs
12345678910111213141516171819using System.Drawing; using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Replace ___ with necessary data type ___ bigValue = 123456789; ___ smallValue = 1234; Console.WriteLine(bigValue); Console.WriteLine(smallValue); } } }
- The keyword for unsigned long data type is
ulong
.
main.cs
123456789101112131415161718using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Replace ___ with necessary data type ulong bigValue = 1234567; int smallValue = 1234; Console.WriteLine(bigValue); Console.WriteLine(smallValue); } } }
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 2
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 1.59
Challenge: Declaring Explicitly Typed Variables
Sveip for å vise menyen
- Declare a variable called
bigValue
of type unsigned long. Initiate it with a value of123456789
. - Declare a variable called
smallValue
of type integer. Initiate it with a value of1234
.
main.cs
12345678910111213141516171819using System.Drawing; using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Replace ___ with necessary data type ___ bigValue = 123456789; ___ smallValue = 1234; Console.WriteLine(bigValue); Console.WriteLine(smallValue); } } }
- The keyword for unsigned long data type is
ulong
.
main.cs
123456789101112131415161718using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Replace ___ with necessary data type ulong bigValue = 1234567; int smallValue = 1234; Console.WriteLine(bigValue); Console.WriteLine(smallValue); } } }
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 2. Kapittel 2