Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Sfida: Dichiarazione di Array | Array
Fondamenti di C#

bookSfida: Dichiarazione di Array

Crea un array vuoto chiamato heights di tipo float e di lunghezza (dimensione) 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 ___ } } }

La sintassi per dichiarare un array vuoto è 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]; } } }

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 5. Capitolo 2

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

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

bookSfida: Dichiarazione di Array

Scorri per mostrare il menu

Crea un array vuoto chiamato heights di tipo float e di lunghezza (dimensione) 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 ___ } } }

La sintassi per dichiarare un array vuoto è 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]; } } }

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 5. Capitolo 2
some-alt