Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Haaste: Taulukon Määrittely | Taulukot
Quizzes & Challenges
Quizzes
Challenges
/
C# Perusteet

bookHaaste: Taulukon Määrittely

Create an empty array called heights of type float and length (size) of 7.

main.cs

main.cs

copy
12345678910111213
using 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

main.cs

copy
12345678910111213
using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Declare an array below this line float[] heights = new float[7]; } } }

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 5. Luku 2

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

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?

bookHaaste: Taulukon Määrittely

Pyyhkäise näyttääksesi valikon

Create an empty array called heights of type float and length (size) of 7.

main.cs

main.cs

copy
12345678910111213
using 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

main.cs

copy
12345678910111213
using System; namespace ConsoleApp { internal class Program { static void Main(string[] args) { // Declare an array below this line float[] heights = new float[7]; } } }

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 5. Luku 2
some-alt