diff --git a/Program.cs b/Program.cs index b3db333..e3001cb 100644 --- a/Program.cs +++ b/Program.cs @@ -4,6 +4,56 @@ class Program { static void Main(string[] args) { - Console.WriteLine("Hello, World!"); + + uint scelta; + double celsius, fahrenheit; + bool exit=false; + Console.Clear(); + do{ + Console.WriteLine("Scegliere un'opzione:"); + Console.WriteLine("1. Celsius -> Fahrenheit"); + Console.WriteLine("2. Quadrato di un numero"); + Console.WriteLine("3. Valore assoluto di un numero"); + Console.WriteLine("4. Verifica se un numero è pari"); + Console.WriteLine("5. Verifica se un numero è divisibile per un'altro"); + Console.WriteLine("6. Esci"); + Console.Write("Scelta: "); + scelta=Convert.ToUInt32(Console.ReadLine()); + + switch (scelta){ + case 1: + Console.WriteLine("Inserire la temperatura in gradi: "); + celsius=Convert.ToDouble(Console.ReadLine()); + fahrenheit=ConvertiCelsiusFahrenheit(celsius); + Console.WriteLine("La temperatura di " +celsius + "°C corrisponde a " +fahrenheit +"°F"); + Console.WriteLine("Premere invio per continuare . . ."); + Console.ReadLine(); + Console.Clear(); + break; + case 2: + break; + case 3: + break; + case 4: + break; + case 5: + break; + case 6: + exit=true; + break; + default: + Console.WriteLine("Scelta non valida"); + Console.WriteLine("Premere invio per continuare . . ."); + Console.ReadLine(); + Console.Clear(); + break; + } + } + while(exit==false); + } + static double ConvertiCelsiusFahrenheit(double p_celsius){ + const double costante1=1.8d; + const int costante2=32; + return (p_celsius*costante1)+costante2; } } diff --git a/bin/Debug/net9.0/miscellanea b/bin/Debug/net9.0/miscellanea new file mode 100755 index 0000000..625bbb3 Binary files /dev/null and b/bin/Debug/net9.0/miscellanea differ diff --git a/bin/Debug/net9.0/miscellanea.deps.json b/bin/Debug/net9.0/miscellanea.deps.json new file mode 100644 index 0000000..8646d8a --- /dev/null +++ b/bin/Debug/net9.0/miscellanea.deps.json @@ -0,0 +1,23 @@ +{ + "runtimeTarget": { + "name": ".NETCoreApp,Version=v9.0", + "signature": "" + }, + "compilationOptions": {}, + "targets": { + ".NETCoreApp,Version=v9.0": { + "miscellanea/1.0.0": { + "runtime": { + "miscellanea.dll": {} + } + } + } + }, + "libraries": { + "miscellanea/1.0.0": { + "type": "project", + "serviceable": false, + "sha512": "" + } + } +} \ No newline at end of file diff --git a/bin/Debug/net9.0/miscellanea.dll b/bin/Debug/net9.0/miscellanea.dll new file mode 100644 index 0000000..ed92fb0 Binary files /dev/null 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 new file mode 100644 index 0000000..f84a071 Binary files /dev/null and b/bin/Debug/net9.0/miscellanea.pdb differ diff --git a/bin/Debug/net9.0/miscellanea.runtimeconfig.json b/bin/Debug/net9.0/miscellanea.runtimeconfig.json new file mode 100644 index 0000000..b19c3c8 --- /dev/null +++ b/bin/Debug/net9.0/miscellanea.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..625bbb3 Binary files /dev/null and b/obj/Debug/net9.0/apphost differ diff --git a/obj/Debug/net9.0/miscellanea.AssemblyInfo.cs b/obj/Debug/net9.0/miscellanea.AssemblyInfo.cs new file mode 100644 index 0000000..e6fd303 --- /dev/null +++ b/obj/Debug/net9.0/miscellanea.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("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.AssemblyProductAttribute("miscellanea")] +[assembly: System.Reflection.AssemblyTitleAttribute("miscellanea")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] + +// Generato dalla classe WriteCodeFragment di MSBuild. + diff --git a/obj/Debug/net9.0/miscellanea.AssemblyInfoInputs.cache b/obj/Debug/net9.0/miscellanea.AssemblyInfoInputs.cache new file mode 100644 index 0000000..10ea8bf --- /dev/null +++ b/obj/Debug/net9.0/miscellanea.AssemblyInfoInputs.cache @@ -0,0 +1 @@ +46958ac0e036f846ab4ddb414c93d65cfdfc1d91125982bda4f99345623b367e diff --git a/obj/Debug/net9.0/miscellanea.GeneratedMSBuildEditorConfig.editorconfig b/obj/Debug/net9.0/miscellanea.GeneratedMSBuildEditorConfig.editorconfig new file mode 100644 index 0000000..ab7a123 --- /dev/null +++ b/obj/Debug/net9.0/miscellanea.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 = miscellanea +build_property.ProjectDir = /home/BrainTheBest5/git/miscellanea/ +build_property.EnableComHosting = +build_property.EnableGeneratedComInterfaceComImportInterop = +build_property.EffectiveAnalysisLevelStyle = 9.0 +build_property.EnableCodeStyleSeverity = diff --git a/obj/Debug/net9.0/miscellanea.GlobalUsings.g.cs b/obj/Debug/net9.0/miscellanea.GlobalUsings.g.cs new file mode 100644 index 0000000..8578f3d --- /dev/null +++ b/obj/Debug/net9.0/miscellanea.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/miscellanea.assets.cache b/obj/Debug/net9.0/miscellanea.assets.cache new file mode 100644 index 0000000..e605bdf Binary files /dev/null and b/obj/Debug/net9.0/miscellanea.assets.cache differ diff --git a/obj/Debug/net9.0/miscellanea.csproj.CoreCompileInputs.cache b/obj/Debug/net9.0/miscellanea.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..82c0ec3 --- /dev/null +++ b/obj/Debug/net9.0/miscellanea.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +2a678936f0961a585bc2dd5ce809e7727fe732b419324ecf5fe9fc7a16a1743f diff --git a/obj/Debug/net9.0/miscellanea.csproj.FileListAbsolute.txt b/obj/Debug/net9.0/miscellanea.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..e12ba49 --- /dev/null +++ b/obj/Debug/net9.0/miscellanea.csproj.FileListAbsolute.txt @@ -0,0 +1,14 @@ +/home/BrainTheBest5/git/miscellanea/obj/Debug/net9.0/miscellanea.GeneratedMSBuildEditorConfig.editorconfig +/home/BrainTheBest5/git/miscellanea/obj/Debug/net9.0/miscellanea.AssemblyInfoInputs.cache +/home/BrainTheBest5/git/miscellanea/obj/Debug/net9.0/miscellanea.AssemblyInfo.cs +/home/BrainTheBest5/git/miscellanea/obj/Debug/net9.0/miscellanea.csproj.CoreCompileInputs.cache +/home/BrainTheBest5/git/miscellanea/bin/Debug/net9.0/miscellanea +/home/BrainTheBest5/git/miscellanea/bin/Debug/net9.0/miscellanea.deps.json +/home/BrainTheBest5/git/miscellanea/bin/Debug/net9.0/miscellanea.runtimeconfig.json +/home/BrainTheBest5/git/miscellanea/bin/Debug/net9.0/miscellanea.dll +/home/BrainTheBest5/git/miscellanea/bin/Debug/net9.0/miscellanea.pdb +/home/BrainTheBest5/git/miscellanea/obj/Debug/net9.0/miscellanea.dll +/home/BrainTheBest5/git/miscellanea/obj/Debug/net9.0/refint/miscellanea.dll +/home/BrainTheBest5/git/miscellanea/obj/Debug/net9.0/miscellanea.pdb +/home/BrainTheBest5/git/miscellanea/obj/Debug/net9.0/miscellanea.genruntimeconfig.cache +/home/BrainTheBest5/git/miscellanea/obj/Debug/net9.0/ref/miscellanea.dll diff --git a/obj/Debug/net9.0/miscellanea.dll b/obj/Debug/net9.0/miscellanea.dll new file mode 100644 index 0000000..ed92fb0 Binary files /dev/null and b/obj/Debug/net9.0/miscellanea.dll differ diff --git a/obj/Debug/net9.0/miscellanea.genruntimeconfig.cache b/obj/Debug/net9.0/miscellanea.genruntimeconfig.cache new file mode 100644 index 0000000..e23b866 --- /dev/null +++ b/obj/Debug/net9.0/miscellanea.genruntimeconfig.cache @@ -0,0 +1 @@ +c5ffa5301c078a758ef8b21bafffefec6ae95b02504b00617cd1bebdd614e9b4 diff --git a/obj/Debug/net9.0/miscellanea.pdb b/obj/Debug/net9.0/miscellanea.pdb new file mode 100644 index 0000000..f84a071 Binary files /dev/null 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 new file mode 100644 index 0000000..db11100 Binary files /dev/null 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 new file mode 100644 index 0000000..db11100 Binary files /dev/null and b/obj/Debug/net9.0/refint/miscellanea.dll differ