diff --git a/Program.cs b/Program.cs index e3001cb..376087d 100644 --- a/Program.cs +++ b/Program.cs @@ -7,7 +7,9 @@ class Program uint scelta; double celsius, fahrenheit; + int numero, quadrato; bool exit=false; + Console.Clear(); do{ Console.WriteLine("Scegliere un'opzione:"); @@ -22,7 +24,8 @@ class Program switch (scelta){ case 1: - Console.WriteLine("Inserire la temperatura in gradi: "); + Console.Clear(); + Console.Write("Inserire la temperatura in gradi: "); celsius=Convert.ToDouble(Console.ReadLine()); fahrenheit=ConvertiCelsiusFahrenheit(celsius); Console.WriteLine("La temperatura di " +celsius + "°C corrisponde a " +fahrenheit +"°F"); @@ -31,8 +34,18 @@ class Program Console.Clear(); break; case 2: + Console.Clear(); + Console.Write("Inserire un numero: "); + numero=Convert.ToInt32(Console.ReadLine()); + quadrato=CalcolaQuadrato(numero); + Console.WriteLine("Il quadrato di " +numero + " è " +quadrato); + Console.WriteLine("Premere invio per continuare . . ."); + Console.ReadLine(); + Console.Clear(); break; case 3: + Console.Clear(); + break; case 4: break; @@ -56,4 +69,7 @@ class Program const int costante2=32; return (p_celsius*costante1)+costante2; } + static int CalcolaQuadrato(int p_numero){ + return p_numero*p_numero; + } } diff --git a/bin/Debug/net9.0/miscellanea.dll b/bin/Debug/net9.0/miscellanea.dll index ed92fb0..2258854 100644 Binary files a/bin/Debug/net9.0/miscellanea.dll and b/bin/Debug/net9.0/miscellanea.dll differ diff --git a/bin/Debug/net9.0/miscellanea.pdb b/bin/Debug/net9.0/miscellanea.pdb index f84a071..cb5bfa9 100644 Binary files a/bin/Debug/net9.0/miscellanea.pdb and b/bin/Debug/net9.0/miscellanea.pdb differ diff --git a/obj/Debug/net9.0/miscellanea.AssemblyInfo.cs b/obj/Debug/net9.0/miscellanea.AssemblyInfo.cs index e6fd303..f57ef13 100644 --- a/obj/Debug/net9.0/miscellanea.AssemblyInfo.cs +++ b/obj/Debug/net9.0/miscellanea.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("miscellanea")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8baeddc8b14f77a4f5a70bacb8a3f12cf0d542d1")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cc5900be0d2e03e61bbb8cd7a905845300a7224d")] [assembly: System.Reflection.AssemblyProductAttribute("miscellanea")] [assembly: System.Reflection.AssemblyTitleAttribute("miscellanea")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/obj/Debug/net9.0/miscellanea.AssemblyInfoInputs.cache b/obj/Debug/net9.0/miscellanea.AssemblyInfoInputs.cache index 10ea8bf..0a7510d 100644 --- a/obj/Debug/net9.0/miscellanea.AssemblyInfoInputs.cache +++ b/obj/Debug/net9.0/miscellanea.AssemblyInfoInputs.cache @@ -1 +1 @@ -46958ac0e036f846ab4ddb414c93d65cfdfc1d91125982bda4f99345623b367e +cd37d2e07e8e322e1e0b99a560dcb280de39c0c917143775811e224e8e743af7 diff --git a/obj/Debug/net9.0/miscellanea.dll b/obj/Debug/net9.0/miscellanea.dll index ed92fb0..2258854 100644 Binary files a/obj/Debug/net9.0/miscellanea.dll and b/obj/Debug/net9.0/miscellanea.dll differ diff --git a/obj/Debug/net9.0/miscellanea.pdb b/obj/Debug/net9.0/miscellanea.pdb index f84a071..cb5bfa9 100644 Binary files a/obj/Debug/net9.0/miscellanea.pdb and b/obj/Debug/net9.0/miscellanea.pdb differ diff --git a/obj/Debug/net9.0/ref/miscellanea.dll b/obj/Debug/net9.0/ref/miscellanea.dll index db11100..f1ee168 100644 Binary files a/obj/Debug/net9.0/ref/miscellanea.dll and b/obj/Debug/net9.0/ref/miscellanea.dll differ diff --git a/obj/Debug/net9.0/refint/miscellanea.dll b/obj/Debug/net9.0/refint/miscellanea.dll index db11100..f1ee168 100644 Binary files a/obj/Debug/net9.0/refint/miscellanea.dll and b/obj/Debug/net9.0/refint/miscellanea.dll differ