diff --git a/Program.cs b/Program.cs index 6b4c190..4bb4454 100644 --- a/Program.cs +++ b/Program.cs @@ -5,10 +5,11 @@ class Program static void Main(string[] args) { //dichiarazione variabili - int scelta; + int scelta, i, numero; + bool positiviPari = true; //menu do { - Console.WriteLine("Scegliere un'opzione:"): + Console.WriteLine("Scegliere un'opzione:"); Console.WriteLine("1. Tutti positivi e pari"); Console.WriteLine("2. Continua fino"); Console.WriteLine("3. Positivo e negativo"); @@ -21,9 +22,33 @@ class Program case 0: break; case 1: + Console.Write("Numeri da inserire: "); + i = Convert.ToInt32(Console.ReadLine()); + for(; i > 0; i--){ + Console.Write("Inserire un numero: "); + numero = Convert.ToInt32(Console.ReadLine()); + if(numero < 0 || numero % 2 != 0){ + positiviPari = false; + } + } + if(positiviPari == true){ + Console.WriteLine("Tutti positivi e pari"); + } + else{ + Console.WriteLine("NO"); + } + break; case 2: + break; case 3: + break; case 4: + break; + default: + Console.WriteLine("Opzione non valida"); + Console.WriteLine("Premere un tasto per continuare. . ."); + Console.ReadKey(); + break; } } while (scelta != 0); diff --git a/bin/Debug/net9.0/ripasso1 b/bin/Debug/net9.0/ripasso1 new file mode 100755 index 0000000..276620e Binary files /dev/null and b/bin/Debug/net9.0/ripasso1 differ diff --git a/bin/Debug/net9.0/ripasso1.deps.json b/bin/Debug/net9.0/ripasso1.deps.json new file mode 100644 index 0000000..c1161ba --- /dev/null +++ b/bin/Debug/net9.0/ripasso1.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v9.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v9.0": { + "ripasso1/1.0.0": { + "runtime": { + "ripasso1.dll": {} + } + } + } + }, + "libraries": { + "ripasso1/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/bin/Debug/net9.0/ripasso1.dll b/bin/Debug/net9.0/ripasso1.dll new file mode 100644 index 0000000..3ccc766 Binary files /dev/null and b/bin/Debug/net9.0/ripasso1.dll differ diff --git a/bin/Debug/net9.0/ripasso1.pdb b/bin/Debug/net9.0/ripasso1.pdb new file mode 100644 index 0000000..ad574b7 Binary files /dev/null and b/bin/Debug/net9.0/ripasso1.pdb differ diff --git a/bin/Debug/net9.0/ripasso1.runtimeconfig.json b/bin/Debug/net9.0/ripasso1.runtimeconfig.json new file mode 100644 index 0000000..b19c3c8 --- /dev/null +++ b/bin/Debug/net9.0/ripasso1.runtimeconfig.json @@ -0,0 +1,12 @@ +{ + "runtimeOptions": { + "tfm": "net9.0", + "framework": { + "name": "Microsoft.NETCore.App", + "version": "9.0.0" + }, + "configProperties": { + "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false + } + } +} \ No newline at end of file diff --git a/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs b/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs new file mode 100644 index 0000000..9e76325 --- /dev/null +++ b/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")] diff --git a/obj/Debug/net9.0/apphost b/obj/Debug/net9.0/apphost new file mode 100755 index 0000000..276620e Binary files /dev/null and b/obj/Debug/net9.0/apphost differ diff --git a/obj/Debug/net9.0/ref/ripasso1.dll b/obj/Debug/net9.0/ref/ripasso1.dll new file mode 100644 index 0000000..45ba7f3 Binary files /dev/null and b/obj/Debug/net9.0/ref/ripasso1.dll differ diff --git a/obj/Debug/net9.0/refint/ripasso1.dll b/obj/Debug/net9.0/refint/ripasso1.dll new file mode 100644 index 0000000..45ba7f3 Binary files /dev/null and b/obj/Debug/net9.0/refint/ripasso1.dll differ diff --git a/obj/Debug/net9.0/ripasso1.AssemblyInfo.cs b/obj/Debug/net9.0/ripasso1.AssemblyInfo.cs new file mode 100644 index 0000000..9413c3a --- /dev/null +++ b/obj/Debug/net9.0/ripasso1.AssemblyInfo.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +[assembly: System.Reflection.AssemblyCompanyAttribute("ripasso1")] +[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+88a3a81dc5c585f0e44e1de67a04fcc0176c2248")] +[assembly: System.Reflection.AssemblyProductAttribute("ripasso1")] +[assembly: System.Reflection.AssemblyTitleAttribute("ripasso1")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generato dalla classe WriteCodeFragment di MSBuild. + diff --git a/obj/Debug/net9.0/ripasso1.AssemblyInfoInputs.cache b/obj/Debug/net9.0/ripasso1.AssemblyInfoInputs.cache new file mode 100644 index 0000000..be6d510 --- /dev/null +++ b/obj/Debug/net9.0/ripasso1.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +df729b33bee225d62533bc9464825af2a889790321bc9d5d69fed3afd170fe83 diff --git a/obj/Debug/net9.0/ripasso1.GeneratedMSBuildEditorConfig.editorconfig b/obj/Debug/net9.0/ripasso1.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..1cc435a --- /dev/null +++ b/obj/Debug/net9.0/ripasso1.GeneratedMSBuildEditorConfig.editorconfig @@ -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 = ripasso1 +build_property.ProjectDir = /home/BrainTheBest5/git/ripasso1/ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 9.0 +build_property.EnableCodeStyleSeverity = diff --git a/obj/Debug/net9.0/ripasso1.GlobalUsings.g.cs b/obj/Debug/net9.0/ripasso1.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/obj/Debug/net9.0/ripasso1.GlobalUsings.g.cs @@ -0,0 +1,8 @@ +// +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; diff --git a/obj/Debug/net9.0/ripasso1.assets.cache b/obj/Debug/net9.0/ripasso1.assets.cache new file mode 100644 index 0000000..18ad0d7 Binary files /dev/null and b/obj/Debug/net9.0/ripasso1.assets.cache differ diff --git a/obj/Debug/net9.0/ripasso1.csproj.CoreCompileInputs.cache b/obj/Debug/net9.0/ripasso1.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..8f92b17 --- /dev/null +++ b/obj/Debug/net9.0/ripasso1.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +f2b0e6c0b87e836a4f8873aad920dcb9ff982fff46e777be243cb398685305e6 diff --git a/obj/Debug/net9.0/ripasso1.csproj.FileListAbsolute.txt b/obj/Debug/net9.0/ripasso1.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..4208153 --- /dev/null +++ b/obj/Debug/net9.0/ripasso1.csproj.FileListAbsolute.txt @@ -0,0 +1,14 @@ +/home/BrainTheBest5/git/ripasso1/obj/Debug/net9.0/ripasso1.GeneratedMSBuildEditorConfig.editorconfig +/home/BrainTheBest5/git/ripasso1/obj/Debug/net9.0/ripasso1.AssemblyInfoInputs.cache +/home/BrainTheBest5/git/ripasso1/obj/Debug/net9.0/ripasso1.AssemblyInfo.cs +/home/BrainTheBest5/git/ripasso1/obj/Debug/net9.0/ripasso1.csproj.CoreCompileInputs.cache +/home/BrainTheBest5/git/ripasso1/bin/Debug/net9.0/ripasso1 +/home/BrainTheBest5/git/ripasso1/bin/Debug/net9.0/ripasso1.deps.json +/home/BrainTheBest5/git/ripasso1/bin/Debug/net9.0/ripasso1.runtimeconfig.json +/home/BrainTheBest5/git/ripasso1/bin/Debug/net9.0/ripasso1.dll +/home/BrainTheBest5/git/ripasso1/bin/Debug/net9.0/ripasso1.pdb +/home/BrainTheBest5/git/ripasso1/obj/Debug/net9.0/ripasso1.dll +/home/BrainTheBest5/git/ripasso1/obj/Debug/net9.0/refint/ripasso1.dll +/home/BrainTheBest5/git/ripasso1/obj/Debug/net9.0/ripasso1.pdb +/home/BrainTheBest5/git/ripasso1/obj/Debug/net9.0/ripasso1.genruntimeconfig.cache +/home/BrainTheBest5/git/ripasso1/obj/Debug/net9.0/ref/ripasso1.dll diff --git a/obj/Debug/net9.0/ripasso1.dll b/obj/Debug/net9.0/ripasso1.dll new file mode 100644 index 0000000..3ccc766 Binary files /dev/null and b/obj/Debug/net9.0/ripasso1.dll differ diff --git a/obj/Debug/net9.0/ripasso1.genruntimeconfig.cache b/obj/Debug/net9.0/ripasso1.genruntimeconfig.cache new file mode 100644 index 0000000..4f2f012 --- /dev/null +++ b/obj/Debug/net9.0/ripasso1.genruntimeconfig.cache @@ -0,0 +1 @@ +d5fefb94b2289b6ee74ca7b5e9b87e64530285d61a9fa32c567d3f7ad25bcf48 diff --git a/obj/Debug/net9.0/ripasso1.pdb b/obj/Debug/net9.0/ripasso1.pdb new file mode 100644 index 0000000..ad574b7 Binary files /dev/null and b/obj/Debug/net9.0/ripasso1.pdb differ