diff --git a/Program.cs b/Program.cs index 611f9eb..f662808 100644 --- a/Program.cs +++ b/Program.cs @@ -146,6 +146,17 @@ class Program { Console.WriteLine("Il valore minimo è " + min + " mentre il valore massimo è " + max); } static void Media(){ - + int input, temp = 0, i = 1; + + do { + Console.Write("Inserire un numero (numero negativo per uscire): "); + input = Convert.ToInt32(Console.ReadLine()); + temp = temp + input; //somma di tutti i valori inseriti + if (i>1 && input>0){ + Console.WriteLine("Media: " + (temp / i)); + } + i++; + } + while (input>0); } } \ No newline at end of file diff --git a/bin/Debug/net9.0/ripasso3.dll b/bin/Debug/net9.0/ripasso3.dll index 0acf776..c1792eb 100644 Binary files a/bin/Debug/net9.0/ripasso3.dll and b/bin/Debug/net9.0/ripasso3.dll differ diff --git a/bin/Debug/net9.0/ripasso3.pdb b/bin/Debug/net9.0/ripasso3.pdb index d0c7b02..5cc84c0 100644 Binary files a/bin/Debug/net9.0/ripasso3.pdb and b/bin/Debug/net9.0/ripasso3.pdb differ diff --git a/obj/Debug/net9.0/ref/ripasso3.dll b/obj/Debug/net9.0/ref/ripasso3.dll index f7752d4..789cd40 100644 Binary files a/obj/Debug/net9.0/ref/ripasso3.dll and b/obj/Debug/net9.0/ref/ripasso3.dll differ diff --git a/obj/Debug/net9.0/refint/ripasso3.dll b/obj/Debug/net9.0/refint/ripasso3.dll index f7752d4..789cd40 100644 Binary files a/obj/Debug/net9.0/refint/ripasso3.dll and b/obj/Debug/net9.0/refint/ripasso3.dll differ diff --git a/obj/Debug/net9.0/ripasso3.AssemblyInfo.cs b/obj/Debug/net9.0/ripasso3.AssemblyInfo.cs index c1588aa..7245a83 100644 --- a/obj/Debug/net9.0/ripasso3.AssemblyInfo.cs +++ b/obj/Debug/net9.0/ripasso3.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("ripasso3")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+3efdd8911e1703151775a922d9fb8d6b4b80d05d")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+be372a37e80b5f33db3f90fa9633f0fab5e810e4")] [assembly: System.Reflection.AssemblyProductAttribute("ripasso3")] [assembly: System.Reflection.AssemblyTitleAttribute("ripasso3")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/obj/Debug/net9.0/ripasso3.AssemblyInfoInputs.cache b/obj/Debug/net9.0/ripasso3.AssemblyInfoInputs.cache index 75dd48a..11cc08b 100644 --- a/obj/Debug/net9.0/ripasso3.AssemblyInfoInputs.cache +++ b/obj/Debug/net9.0/ripasso3.AssemblyInfoInputs.cache @@ -1 +1 @@ -d73a50dabbb49d991ace67ec8edcaa15cf29464cf2168b7c8fae774cd9acccb0 +984d76e55b057a5f8a99dfccaffad974dfc1272ee4447e584917b2b2bf3541e8 diff --git a/obj/Debug/net9.0/ripasso3.dll b/obj/Debug/net9.0/ripasso3.dll index 0acf776..c1792eb 100644 Binary files a/obj/Debug/net9.0/ripasso3.dll and b/obj/Debug/net9.0/ripasso3.dll differ diff --git a/obj/Debug/net9.0/ripasso3.pdb b/obj/Debug/net9.0/ripasso3.pdb index d0c7b02..5cc84c0 100644 Binary files a/obj/Debug/net9.0/ripasso3.pdb and b/obj/Debug/net9.0/ripasso3.pdb differ