Opzione 3
This commit is contained in:
parent
fc5e00d760
commit
31b8798979
53
Program.cs
53
Program.cs
@ -29,7 +29,7 @@ class Program {
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
Console.Clear();
|
Console.Clear();
|
||||||
|
Submenu();
|
||||||
Pausa();
|
Pausa();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
@ -105,5 +105,54 @@ class Program {
|
|||||||
return ritorno;
|
return ritorno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void Submenu(){
|
||||||
|
Console.Clear();
|
||||||
|
string frase, input;
|
||||||
|
int scelta;
|
||||||
|
|
||||||
|
Console.Write("Inserire una frase: ");
|
||||||
|
input = Console.ReadLine();
|
||||||
|
Console.Clear();
|
||||||
|
|
||||||
|
do {
|
||||||
|
frase = input;
|
||||||
|
Console.WriteLine($"Frase corrente: {frase}");
|
||||||
|
Console.WriteLine();
|
||||||
|
Console.WriteLine("Inserire un'opzione:");
|
||||||
|
Console.WriteLine("1. Converti in minuscolo");
|
||||||
|
Console.WriteLine("2. Converti in maiuscolo");
|
||||||
|
Console.WriteLine("3. Sostituisci \'.\' con \\n");
|
||||||
|
Console.WriteLine("0. Esci");
|
||||||
|
Console.Write("Scelta: ");
|
||||||
|
scelta = Convert.ToInt32(Console.ReadLine());
|
||||||
|
|
||||||
|
switch (scelta) {
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
Console.Clear();
|
||||||
|
frase = frase.ToLower();
|
||||||
|
Console.WriteLine($"Frase in minuscolo: {frase}");
|
||||||
|
Pausa();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
Console.Clear();
|
||||||
|
frase = frase.ToUpper();
|
||||||
|
Console.WriteLine($"Frase in maiuscolo: {frase}");
|
||||||
|
Pausa();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
Console.Clear();
|
||||||
|
Console.WriteLine($"Frase con \\n: {frase.Replace(".", "\\n")}\n\n");
|
||||||
|
Console.WriteLine($"Frase con \\n interpretato: {frase.Replace(".", "\n")}");
|
||||||
|
Pausa();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Console.WriteLine("Opzione non valida.");
|
||||||
|
Pausa();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (scelta != 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -13,7 +13,7 @@ using System.Reflection;
|
|||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("strings_1")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("strings_1")]
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+9a6a7d033df24618f23d8c678ad89ad9da11fd5f")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+fc5e00d760f79e678e9cd4784cb86739463eae8a")]
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("strings_1")]
|
[assembly: System.Reflection.AssemblyProductAttribute("strings_1")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("strings_1")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("strings_1")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
026fc32c5f2b08f1f28bf8d9d499576953af691b4c04f7de6e6d7956b19089a8
|
e3ce3c7de95ef6326cdd83691d152ba9a50ea4fbf3aaa1a3ecd06cdf889c90e9
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user