From d8809640625ff7113b3e534a0ddc84d970674570 Mon Sep 17 00:00:00 2001 From: braxtonhall Date: Mon, 24 Oct 2022 15:21:37 -0700 Subject: Add Marie --- entries/MarieSal0/FibonacciWorkplace/.gitignore | 133 +++++++++++++++++++++ .../FibonacciWorkplace/FibonacciWorkplace.csproj | 10 ++ entries/MarieSal0/FibonacciWorkplace/Program.cs | 41 +++++++ people.json | 11 ++ 4 files changed, 195 insertions(+) create mode 100644 entries/MarieSal0/FibonacciWorkplace/.gitignore create mode 100644 entries/MarieSal0/FibonacciWorkplace/FibonacciWorkplace.csproj create mode 100644 entries/MarieSal0/FibonacciWorkplace/Program.cs 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 @@ + + + + Exe + net6.0 + enable + enable + + + 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 diff --git a/people.json b/people.json index b84c8d8..60654a5 100644 --- a/people.json +++ b/people.json @@ -100,6 +100,17 @@ } ] }, + { + "github": "MarieSal0", + "name": "Marie Salomon", + "title": "MSc Student, UBC", + "entries": [ + { + "name": "c#", + "link": "./entries/MarieSal0/FibonacciWorkplace/Program.cs" + } + ] + }, { "github": "meghasinghania22", "name": "Megha Singhania", -- cgit v1.2.3-70-g09d2