Menù
This commit is contained in:
parent
0890df0f7d
commit
41ede894b3
96
Program.cs
96
Program.cs
@ -1,9 +1,95 @@
|
|||||||
namespace strings_4;
|
namespace strings_4;
|
||||||
|
|
||||||
class Program
|
class Program {
|
||||||
{
|
static void Main(string[] args) {
|
||||||
static void Main(string[] args)
|
Menu();
|
||||||
{
|
|
||||||
Console.WriteLine("Hello, World!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void Menu() {
|
||||||
|
Console.Clear();
|
||||||
|
int scelta;
|
||||||
|
string stringa1, stringa2;
|
||||||
|
do {
|
||||||
|
Console.WriteLine("Inserire un'opzione:");
|
||||||
|
Console.WriteLine("1. Conta spazi pre maiuscola");
|
||||||
|
Console.WriteLine("2. Codifica di una frase");
|
||||||
|
Console.WriteLine("3. Primo carattere maiuscolo");
|
||||||
|
Console.WriteLine("4. Sostituisci sottostringa");
|
||||||
|
Console.WriteLine("5. Parola palindroma pari");
|
||||||
|
Console.WriteLine("0. Esci");
|
||||||
|
Console.Write("Scelta: ");
|
||||||
|
scelta = Convert.ToInt32(Console.ReadLine());
|
||||||
|
|
||||||
|
switch (scelta) {
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
Console.Clear();
|
||||||
|
|
||||||
|
Pausa();
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
Console.Clear();
|
||||||
|
//Console.WriteLine(Codifica());
|
||||||
|
Pausa();
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
Console.Clear();
|
||||||
|
stringa1 = Input();
|
||||||
|
|
||||||
|
/* if (Controllo2(stringa1, LUNGHEZZA)) {
|
||||||
|
Console.WriteLine(PrimoCarattereMaiuscolo(stringa1));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Console.WriteLine($"Errore: la frase non può essere più lunga di {LUNGHEZZA} caratteri");
|
||||||
|
}*/
|
||||||
|
Pausa();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
Console.Clear();
|
||||||
|
Console.WriteLine("È richiesta la frase in cui effettuare la ricerca");
|
||||||
|
stringa1 = Input();
|
||||||
|
Console.WriteLine();
|
||||||
|
Console.WriteLine("È richiesta la frase che verrà sostituita");
|
||||||
|
stringa2 = Input();
|
||||||
|
Console.WriteLine();
|
||||||
|
/*if (Controllo2(stringa2, stringa1.Length)) {
|
||||||
|
Console.WriteLine(TrovaESostituisci(stringa1, stringa2));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Console.WriteLine($"Errore: la frase da cercare non può essere più lunga della frase in cui cercare");
|
||||||
|
}*/
|
||||||
|
Pausa();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
Console.Clear();
|
||||||
|
//Console.WriteLine(CreaPalindromo(Input(), true));
|
||||||
|
Pausa();
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
Console.Clear();
|
||||||
|
//Console.WriteLine(CreaPalindromo(Input(), false));
|
||||||
|
Pausa();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
Console.WriteLine("Opzione non valida.");
|
||||||
|
Pausa();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (scelta != 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void Pausa() {
|
||||||
|
Console.WriteLine("Premere un tasto per continuare. . .");
|
||||||
|
Console.ReadKey();
|
||||||
|
Console.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
static string Input() {
|
||||||
|
Console.Write("Inserire una frase: ");
|
||||||
|
return Console.ReadLine();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
// <autogenerated />
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]
|
||||||
22
obj/Debug/net9.0/strings_4.AssemblyInfo.cs
Normal file
22
obj/Debug/net9.0/strings_4.AssemblyInfo.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
[assembly: System.Reflection.AssemblyCompanyAttribute("strings_4")]
|
||||||
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||||
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+0890df0f7da1fc9d13a42f53c7c82ff1470edecc")]
|
||||||
|
[assembly: System.Reflection.AssemblyProductAttribute("strings_4")]
|
||||||
|
[assembly: System.Reflection.AssemblyTitleAttribute("strings_4")]
|
||||||
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
|
||||||
|
// Generated by the MSBuild WriteCodeFragment class.
|
||||||
|
|
||||||
1
obj/Debug/net9.0/strings_4.AssemblyInfoInputs.cache
Normal file
1
obj/Debug/net9.0/strings_4.AssemblyInfoInputs.cache
Normal file
@ -0,0 +1 @@
|
|||||||
|
055ecdb82c22aa317dca173731d42ab01b79189856675a97695bb5b91d4b5339
|
||||||
@ -0,0 +1,15 @@
|
|||||||
|
is_global = true
|
||||||
|
build_property.TargetFramework = net9.0
|
||||||
|
build_property.TargetPlatformMinVersion =
|
||||||
|
build_property.UsingMicrosoftNETSdkWeb =
|
||||||
|
build_property.ProjectTypeGuids =
|
||||||
|
build_property.InvariantGlobalization =
|
||||||
|
build_property.PlatformNeutralAssembly =
|
||||||
|
build_property.EnforceExtendedAnalyzerRules =
|
||||||
|
build_property._SupportedPlatformList = Linux,macOS,Windows
|
||||||
|
build_property.RootNamespace = strings_4
|
||||||
|
build_property.ProjectDir = /home/Verde/git/strings_4/
|
||||||
|
build_property.EnableComHosting =
|
||||||
|
build_property.EnableGeneratedComInterfaceComImportInterop =
|
||||||
|
build_property.EffectiveAnalysisLevelStyle = 9.0
|
||||||
|
build_property.EnableCodeStyleSeverity =
|
||||||
8
obj/Debug/net9.0/strings_4.GlobalUsings.g.cs
Normal file
8
obj/Debug/net9.0/strings_4.GlobalUsings.g.cs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
global using global::System;
|
||||||
|
global using global::System.Collections.Generic;
|
||||||
|
global using global::System.IO;
|
||||||
|
global using global::System.Linq;
|
||||||
|
global using global::System.Net.Http;
|
||||||
|
global using global::System.Threading;
|
||||||
|
global using global::System.Threading.Tasks;
|
||||||
BIN
obj/Debug/net9.0/strings_4.assets.cache
Normal file
BIN
obj/Debug/net9.0/strings_4.assets.cache
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user