Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Sfida: Formattazione Delle Stringhe | Gestione dei Tipi di Dati
Quizzes & Challenges
Quizzes
Challenges
/
Fondamenti di C#

bookSfida: Formattazione Delle Stringhe

Correggi il codice affinché i valori siano correttamente inseriti nella stringa output.

main.cs

main.cs

copy
12345678910111213141516
using System; internal class Program { static void Main(string[] args) { int num_1 = 10; int num_2 = num_1 * 2; int num_3 = num_2 * 3; int num_4 = num_1 + num_2 + num_3; // Change code below this line Console.WriteLine("The sum of {num_1}, {num_2} and {num_3} is {num_4}"); // Change code above this line } }

Cerca eventuali simboli mancanti nella sintassi di formattazione delle stringhe.

main.cs

main.cs

copy
1234567891011121314151617
using System; internal class Program { static void Main(string[] args) { int num_1 = 10; int num_2 = num_1 * 2; int num_3 = num_2 * 3; int num_4 = num_1 + num_2 + num_3; // Change code below this line Console.WriteLine($"The sum of {num_1}, {num_2} and {num_3} is {num_4}"); // Change code above this line } }

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 9

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:

What is the current code that needs to be fixed?

Can you show me the part of the code where the string formatting is used?

What programming language is this code written in?

bookSfida: Formattazione Delle Stringhe

Scorri per mostrare il menu

Correggi il codice affinché i valori siano correttamente inseriti nella stringa output.

main.cs

main.cs

copy
12345678910111213141516
using System; internal class Program { static void Main(string[] args) { int num_1 = 10; int num_2 = num_1 * 2; int num_3 = num_2 * 3; int num_4 = num_1 + num_2 + num_3; // Change code below this line Console.WriteLine("The sum of {num_1}, {num_2} and {num_3} is {num_4}"); // Change code above this line } }

Cerca eventuali simboli mancanti nella sintassi di formattazione delle stringhe.

main.cs

main.cs

copy
1234567891011121314151617
using System; internal class Program { static void Main(string[] args) { int num_1 = 10; int num_2 = num_1 * 2; int num_3 = num_2 * 3; int num_4 = num_1 + num_2 + num_3; // Change code below this line Console.WriteLine($"The sum of {num_1}, {num_2} and {num_3} is {num_4}"); // Change code above this line } }

Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 9
some-alt