Primo ed ultimo elemento del menù funzionanti

This commit is contained in:
La Programmatrice Verde 2024-11-29 08:36:49 +01:00
parent 8baeddc8b1
commit cc5900be0d
20 changed files with 152 additions and 1 deletions

View File

@ -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;
}
}

BIN
bin/Debug/net9.0/miscellanea Executable file

Binary file not shown.

View File

@ -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": ""
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,12 @@
{
"runtimeOptions": {
"tfm": "net9.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "9.0.0"
},
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}

View File

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]

BIN
obj/Debug/net9.0/apphost Executable file

Binary file not shown.

View File

@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
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.

View File

@ -0,0 +1 @@
46958ac0e036f846ab4ddb414c93d65cfdfc1d91125982bda4f99345623b367e

View File

@ -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 =

View File

@ -0,0 +1,8 @@
// <auto-generated/>
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;

Binary file not shown.

View File

@ -0,0 +1 @@
2a678936f0961a585bc2dd5ce809e7727fe732b419324ecf5fe9fc7a16a1743f

View File

@ -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

Binary file not shown.

View File

@ -0,0 +1 @@
c5ffa5301c078a758ef8b21bafffefec6ae95b02504b00617cd1bebdd614e9b4

Binary file not shown.

Binary file not shown.

Binary file not shown.