diff options
author | James Yoo | 2022-10-24 23:47:51 +0000 |
---|---|---|
committer | James Yoo | 2022-10-24 23:47:51 +0000 |
commit | 03315f012514bdcc5a4f654056f0103abe11eb83 (patch) | |
tree | 2b7c6e9233ecb503e7be0d8354483691f9a1e16c /entries/MarieSal0/FibonacciWorkplace | |
parent | 0921d8222bb883ea86d51c7200a865a5e4dbc469 (diff) | |
parent | 7ed13a92711a35a9c263c1f53e33e308653ae727 (diff) |
Merging local with remote main
Diffstat (limited to 'entries/MarieSal0/FibonacciWorkplace')
-rw-r--r-- | entries/MarieSal0/FibonacciWorkplace/.gitignore | 133 | ||||
-rw-r--r-- | entries/MarieSal0/FibonacciWorkplace/FibonacciWorkplace.csproj | 10 | ||||
-rw-r--r-- | entries/MarieSal0/FibonacciWorkplace/Program.cs | 41 |
3 files changed, 184 insertions, 0 deletions
diff --git a/entries/MarieSal0/FibonacciWorkplace/.gitignore b/entries/MarieSal0/FibonacciWorkplace/.gitignore new file mode 100644 index 0000000..9b956f9 --- /dev/null +++ b/entries/MarieSal0/FibonacciWorkplace/.gitignore @@ -0,0 +1,133 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.svclog +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml +*.azurePubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +packages/ +## TODO: If the tool you use requires repositories.config, also uncomment the next line +!packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +![Ss]tyle[Cc]op.targets +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml + +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +# ========================= +# Windows detritus +# ========================= + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac desktop service store files +.DS_Store + +_NCrunch*
\ No newline at end of file diff --git a/entries/MarieSal0/FibonacciWorkplace/FibonacciWorkplace.csproj b/entries/MarieSal0/FibonacciWorkplace/FibonacciWorkplace.csproj new file mode 100644 index 0000000..40c60dd --- /dev/null +++ b/entries/MarieSal0/FibonacciWorkplace/FibonacciWorkplace.csproj @@ -0,0 +1,10 @@ +<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>net6.0</TargetFramework>
+ <ImplicitUsings>enable</ImplicitUsings>
+ <Nullable>enable</Nullable>
+ </PropertyGroup>
+
+</Project>
diff --git a/entries/MarieSal0/FibonacciWorkplace/Program.cs b/entries/MarieSal0/FibonacciWorkplace/Program.cs new file mode 100644 index 0000000..bac5688 --- /dev/null +++ b/entries/MarieSal0/FibonacciWorkplace/Program.cs @@ -0,0 +1,41 @@ +using System;
+namespace FibonacciWorkplace
+{
+ public class Program
+ {
+ static void Main(string[] args)
+ {
+ Console.Write("How long should the Fibonacci Series be?? ");
+ int lengthOfSeries = Convert.ToInt32(Console.ReadLine());
+ if (lengthOfSeries<=2)
+ {
+ LengthCheck(lengthOfSeries);
+ }
+ FibonacciSeries(0, 1, 1, lengthOfSeries);
+ Console.ReadKey();
+ }
+ public static void LengthCheck(int lengthOfSeries)
+ {
+ if (lengthOfSeries<=1)
+ {
+ Console.Write("The Fibonacci Series needs to be greater than 2");
+ lengthOfSeries = Convert.ToInt32(Console.ReadLine());
+ LengthCheck(lengthOfSeries);
+ }
+
+ }
+
+ public static void FibonacciSeries(int firstNumber, int secondNumber, int counter, int lengthOfSeries)
+ {
+ Console.Write(firstNumber + " ");
+ if (counter < lengthOfSeries)
+ {
+ int sum = firstNumber + secondNumber;
+ counter++;
+ FibonacciSeries(secondNumber, sum, counter, lengthOfSeries);
+ }
+ }
+
+
+ }
+}
\ No newline at end of file |