diff --git a/Program.cs b/Program.cs index 0c53b7c..d244252 100644 --- a/Program.cs +++ b/Program.cs @@ -107,8 +107,13 @@ class Program return p_numero*p_numero; } static int CalcolaValoreAssoluto(int p_numero){ - const int costante1=31; - return (p_numero + (p_numero >> costante1)) ^ (p_numero >> costante1); + const int costante1=-1; + if (p_numero<0){ + return p_numero*costante1; + } + else{ + return p_numero; + } } static bool VerificaNumeroPari(int p_numero){ if (p_numero%2==0){ diff --git a/bin/Debug/net9.0/miscellanea.dll b/bin/Debug/net9.0/miscellanea.dll index a046901..494b6f0 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 43b6a0d..16ecabf 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 1a91861..97d866b 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+7ba7b81980177f67f02957fc7927b07fbe320f9e")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6ef3c92bfe1fa9cd10a726a95ec35692e9855fc5")] [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 89d43d4..a2e44ff 100644 --- a/obj/Debug/net9.0/miscellanea.AssemblyInfoInputs.cache +++ b/obj/Debug/net9.0/miscellanea.AssemblyInfoInputs.cache @@ -1 +1 @@ -03707c09f63468c9a7dd5dc5b526deca7119451a9080efc2c2b4f585d9ef2bcd +33feeae87dc5512a07eb6a72f4a4558f1e8099bdd9ccbacaa2fbb2ff25e3a368 diff --git a/obj/Debug/net9.0/miscellanea.dll b/obj/Debug/net9.0/miscellanea.dll index a046901..494b6f0 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 43b6a0d..16ecabf 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 805f824..917682f 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 805f824..917682f 100644 Binary files a/obj/Debug/net9.0/refint/miscellanea.dll and b/obj/Debug/net9.0/refint/miscellanea.dll differ