Utfordring: Array-deklarasjon
Create an empty array called heights of type float and length (size) of 7.
main.cs
12345678910111213using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Declare an array below this line ___ } } }
The syntax of declaring an empty array is datatype[] arrayName = new datatype[size];.
main.cs
12345678910111213using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Declare an array below this line float[] heights = new float[7]; } } }
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 5. 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
Suggested prompts:
Can you show me how to declare the `heights` array in code?
What does the array look like after initialization?
Can you explain what each part of the declaration means?
Awesome!
Completion rate improved to 1.59
Utfordring: Array-deklarasjon
Sveip for å vise menyen
Create an empty array called heights of type float and length (size) of 7.
main.cs
12345678910111213using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Declare an array below this line ___ } } }
The syntax of declaring an empty array is datatype[] arrayName = new datatype[size];.
main.cs
12345678910111213using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Declare an array below this line float[] heights = new float[7]; } } }
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 5. Kapittel 2