diff --git a/Program.cs b/Program.cs index f1115a1..0c53b7c 100644 --- a/Program.cs +++ b/Program.cs @@ -6,9 +6,9 @@ class Program { uint scelta; - double celsius, fahrenheit; + double celsius, fahrenheit, divisore, dividendo; int numero, quadrato, negativo, assoluto; - bool exit=false, pari; + bool exit=false, pari, divisibile; Console.Clear(); do{ @@ -69,6 +69,21 @@ class Program Console.Clear(); break; case 5: + Console.Clear(); + Console.Write("Inserire il dividendo: "); + dividendo=Convert.ToInt32(Console.ReadLine()); + Console.Write("Inserire il divisore: "); + divisore=Convert.ToInt32(Console.ReadLine()); + divisibile=VerificaDivisibile(dividendo,divisore); + if (divisibile==true){ + Console.WriteLine("Il numero " +dividendo + " è divisibile per " +divisore); + } + else{ + Console.WriteLine("Il numero " +dividendo + " non è divisibile per " +divisore); + } + Console.WriteLine("Premere invio per continuare . . ."); + Console.ReadLine(); + Console.Clear(); break; case 6: exit=true; @@ -103,4 +118,12 @@ class Program return false; } } + static bool VerificaDivisibile(double p_dividendo, double p_divisore){ + if (p_dividendo%p_divisore==0){ + return true; + } + else{ + return false; + } + } } diff --git a/bin/Debug/net9.0/miscellanea.dll b/bin/Debug/net9.0/miscellanea.dll index 78e80fb..a046901 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 b3e6bc9..43b6a0d 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 dfbeb7c..1a91861 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+8d7b26661d5591a9d008786305e66a141d43841a")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7ba7b81980177f67f02957fc7927b07fbe320f9e")] [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 0daae19..89d43d4 100644 --- a/obj/Debug/net9.0/miscellanea.AssemblyInfoInputs.cache +++ b/obj/Debug/net9.0/miscellanea.AssemblyInfoInputs.cache @@ -1 +1 @@ -a641cf65aa001c293b1228046a124937b0e511f5c570f7cf40b37768407d155f +03707c09f63468c9a7dd5dc5b526deca7119451a9080efc2c2b4f585d9ef2bcd diff --git a/obj/Debug/net9.0/miscellanea.dll b/obj/Debug/net9.0/miscellanea.dll index 78e80fb..a046901 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 b3e6bc9..43b6a0d 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 753992c..805f824 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 753992c..805f824 100644 Binary files a/obj/Debug/net9.0/refint/miscellanea.dll and b/obj/Debug/net9.0/refint/miscellanea.dll differ