diff --git a/Days_left_for_christmas/Days_left_for_christmas.sln b/Days_left_for_christmas/Days_left_for_christmas.sln new file mode 100644 index 0000000..82b71fe --- /dev/null +++ b/Days_left_for_christmas/Days_left_for_christmas.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29326.143 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Days_left_for_christmas", "Days_left_for_christmas\Days_left_for_christmas.csproj", "{F13CBD44-05B3-4821-8ADB-1C2FAF309AC5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F13CBD44-05B3-4821-8ADB-1C2FAF309AC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F13CBD44-05B3-4821-8ADB-1C2FAF309AC5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F13CBD44-05B3-4821-8ADB-1C2FAF309AC5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F13CBD44-05B3-4821-8ADB-1C2FAF309AC5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F04729B9-12B1-46A0-A840-E5860E436C12} + EndGlobalSection +EndGlobal diff --git a/Days_left_for_christmas/Days_left_for_christmas/App.config b/Days_left_for_christmas/Days_left_for_christmas/App.config new file mode 100644 index 0000000..5754728 --- /dev/null +++ b/Days_left_for_christmas/Days_left_for_christmas/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Days_left_for_christmas/Days_left_for_christmas/Days_left_for_christmas.csproj b/Days_left_for_christmas/Days_left_for_christmas/Days_left_for_christmas.csproj new file mode 100644 index 0000000..28a8242 --- /dev/null +++ b/Days_left_for_christmas/Days_left_for_christmas/Days_left_for_christmas.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {F13CBD44-05B3-4821-8ADB-1C2FAF309AC5} + Exe + Days_left_for_christmas + Days_left_for_christmas + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Days_left_for_christmas/Days_left_for_christmas/Properties/AssemblyInfo.cs b/Days_left_for_christmas/Days_left_for_christmas/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..fb29994 --- /dev/null +++ b/Days_left_for_christmas/Days_left_for_christmas/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Le informazioni generali relative a un assembly sono controllate dal seguente +// set di attributi. Modificare i valori di questi attributi per modificare le informazioni +// associate a un assembly. +[assembly: AssemblyTitle("Days_left_for_christmas")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Days_left_for_christmas")] +[assembly: AssemblyCopyright("Copyright © 2022")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili +// ai componenti COM. Se è necessario accedere a un tipo in questo assembly da +// COM, impostare su true l'attributo ComVisible per tale tipo. +[assembly: ComVisible(false)] + +// Se il progetto viene esposto a COM, il GUID seguente verrà utilizzato come ID della libreria dei tipi +[assembly: Guid("f13cbd44-05b3-4821-8adb-1c2faf309ac5")] + +// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori: +// +// Versione principale +// Versione secondaria +// Numero di build +// Revisione +// +// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build +// usando l'asterisco '*' come illustrato di seguito: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Days_left_for_christmas/Days_left_for_christmas/bin/Debug/Days_left_for_christmas.exe b/Days_left_for_christmas/Days_left_for_christmas/bin/Debug/Days_left_for_christmas.exe new file mode 100644 index 0000000..99e71b7 Binary files /dev/null and b/Days_left_for_christmas/Days_left_for_christmas/bin/Debug/Days_left_for_christmas.exe differ diff --git a/Days_left_for_christmas/Days_left_for_christmas/bin/Debug/Days_left_for_christmas.exe.config b/Days_left_for_christmas/Days_left_for_christmas/bin/Debug/Days_left_for_christmas.exe.config new file mode 100644 index 0000000..5754728 --- /dev/null +++ b/Days_left_for_christmas/Days_left_for_christmas/bin/Debug/Days_left_for_christmas.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Days_left_for_christmas/Days_left_for_christmas/bin/Debug/Days_left_for_christmas.pdb b/Days_left_for_christmas/Days_left_for_christmas/bin/Debug/Days_left_for_christmas.pdb new file mode 100644 index 0000000..e9bd32e Binary files /dev/null and b/Days_left_for_christmas/Days_left_for_christmas/bin/Debug/Days_left_for_christmas.pdb differ diff --git a/Days_left_for_christmas/Days_left_for_christmas/days_left_christmas.cs b/Days_left_for_christmas/Days_left_for_christmas/days_left_christmas.cs new file mode 100644 index 0000000..22b8676 --- /dev/null +++ b/Days_left_for_christmas/Days_left_for_christmas/days_left_christmas.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Days_left_for_christmas +{ + class days_left_christmas + { + static void Main(string[] args) + { + bool risp = true; + Console.Write("Vuoi sapere tra quanto è Natale? [s/n]"); + char risposta = Convert.ToChar(Console.ReadLine()); + giorni(risposta == 's' ? risp == true : risp == false); + Console.ReadKey(); + } + static void giorni(bool cond) + { + if (cond) + { + DateTime oggi = DateTime.Today; + DateTime Natale = new DateTime(oggi.Year, 12, 25); + int giorni_rimanenti = Convert.ToInt32(Natale.DayOfYear) - Convert.ToInt32(oggi.DayOfYear); + if (giorni_rimanenti < 0) + { + DateTime ultimo = new DateTime(oggi.Year, 12, 31); + int tmp = Convert.ToInt32(ultimo.DayOfYear) - Convert.ToInt32(oggi.DayOfYear); + giorni_rimanenti = tmp + Convert.ToInt32(Natale.DayOfYear); + Console.WriteLine($"Mancano {giorni_rimanenti} giorni a Natale!"); + return; + } + Console.WriteLine($"Mancano {giorni_rimanenti} giorni a Natale!"); + Console.Write("Non sei contento?"); + } + else + { + Console.WriteLine("Come vuoi,rimani col dubbio..."); + } + } + } +} diff --git a/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/Days_left_for_christmas.csproj.FileListAbsolute.txt b/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/Days_left_for_christmas.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..17e6f41 --- /dev/null +++ b/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/Days_left_for_christmas.csproj.FileListAbsolute.txt @@ -0,0 +1,6 @@ +C:\Users\apilati\source\repos\Days_left_for_christmas\Days_left_for_christmas\bin\Debug\Days_left_for_christmas.exe.config +C:\Users\apilati\source\repos\Days_left_for_christmas\Days_left_for_christmas\bin\Debug\Days_left_for_christmas.exe +C:\Users\apilati\source\repos\Days_left_for_christmas\Days_left_for_christmas\bin\Debug\Days_left_for_christmas.pdb +C:\Users\apilati\source\repos\Days_left_for_christmas\Days_left_for_christmas\obj\Debug\Days_left_for_christmas.csprojAssemblyReference.cache +C:\Users\apilati\source\repos\Days_left_for_christmas\Days_left_for_christmas\obj\Debug\Days_left_for_christmas.exe +C:\Users\apilati\source\repos\Days_left_for_christmas\Days_left_for_christmas\obj\Debug\Days_left_for_christmas.pdb diff --git a/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/Days_left_for_christmas.csprojAssemblyReference.cache b/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/Days_left_for_christmas.csprojAssemblyReference.cache new file mode 100644 index 0000000..ae1d51c Binary files /dev/null and b/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/Days_left_for_christmas.csprojAssemblyReference.cache differ diff --git a/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/Days_left_for_christmas.exe b/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/Days_left_for_christmas.exe new file mode 100644 index 0000000..99e71b7 Binary files /dev/null and b/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/Days_left_for_christmas.exe differ diff --git a/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/Days_left_for_christmas.pdb b/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/Days_left_for_christmas.pdb new file mode 100644 index 0000000..e9bd32e Binary files /dev/null and b/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/Days_left_for_christmas.pdb differ diff --git a/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..2919095 Binary files /dev/null and b/Days_left_for_christmas/Days_left_for_christmas/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ