Opzione 2

This commit is contained in:
La Programmatrice Verde 2025-02-27 09:56:30 +01:00
parent 8bd4398e08
commit 3338996751

View File

@ -31,7 +31,12 @@ class Program {
break;
case 2:
Console.Clear();
if (array != null) {
StampaArray(array);
}
else {
Console.WriteLine("Errore: è necessario creare l'array prima di mostrarlo.");
}
Pausa();
break;
case 3:
@ -83,5 +88,10 @@ class Program {
return ritorno;
}
static void StampaArray(string[] p_array) {
for (int i = 0; i < p_array.Length; i++) {
Console.WriteLine($"Elemento n.{i + 1}: {p_array[i]}");
}
}
}