diff --git a/HelloWorld/.vs/HelloWorld/v16/.suo b/HelloWorld/.vs/HelloWorld/v16/.suo new file mode 100644 index 00000000..56e24b1c Binary files /dev/null and b/HelloWorld/.vs/HelloWorld/v16/.suo differ diff --git a/HelloWorld/.vs/VSWorkspaceState.json b/HelloWorld/.vs/VSWorkspaceState.json new file mode 100644 index 00000000..6b611411 --- /dev/null +++ b/HelloWorld/.vs/VSWorkspaceState.json @@ -0,0 +1,6 @@ +{ + "ExpandedNodes": [ + "" + ], + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/HelloWorld/.vs/slnx.sqlite b/HelloWorld/.vs/slnx.sqlite new file mode 100644 index 00000000..1bc52c1f Binary files /dev/null and b/HelloWorld/.vs/slnx.sqlite differ diff --git a/HelloWorld/HelloWorld.cs b/HelloWorld/HelloWorld.cs index 8168c805..f185c319 100644 --- a/HelloWorld/HelloWorld.cs +++ b/HelloWorld/HelloWorld.cs @@ -6,7 +6,7 @@ class Program { static void Main(string[] args) { - Console.WriteLine("Hello World!"); + Console.WriteLine("Hello Worlds!"); } } } diff --git a/ManyMethods/.vs/ManyMethods/v16/.suo b/ManyMethods/.vs/ManyMethods/v16/.suo new file mode 100644 index 00000000..4ab2b886 Binary files /dev/null and b/ManyMethods/.vs/ManyMethods/v16/.suo differ diff --git a/ManyMethods/.vs/ManyMethods/v16/Server/sqlite3/db.lock b/ManyMethods/.vs/ManyMethods/v16/Server/sqlite3/db.lock new file mode 100644 index 00000000..e69de29b diff --git a/ManyMethods/.vs/ManyMethods/v16/Server/sqlite3/storage.ide b/ManyMethods/.vs/ManyMethods/v16/Server/sqlite3/storage.ide new file mode 100644 index 00000000..fa748b43 Binary files /dev/null and b/ManyMethods/.vs/ManyMethods/v16/Server/sqlite3/storage.ide differ diff --git a/ManyMethods/App.config b/ManyMethods/App.config new file mode 100644 index 00000000..56efbc7b --- /dev/null +++ b/ManyMethods/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ManyMethods/ManyMethods.csproj b/ManyMethods/ManyMethods.csproj new file mode 100644 index 00000000..66f7d16e --- /dev/null +++ b/ManyMethods/ManyMethods.csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {6672A275-AD57-4791-A606-A69AE279414F} + Exe + ManyMethods + ManyMethods + 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/ManyMethods/ManyMethods.sln b/ManyMethods/ManyMethods.sln new file mode 100644 index 00000000..748f4e27 --- /dev/null +++ b/ManyMethods/ManyMethods.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29009.5 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManyMethods", "ManyMethods.csproj", "{6672A275-AD57-4791-A606-A69AE279414F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6672A275-AD57-4791-A606-A69AE279414F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6672A275-AD57-4791-A606-A69AE279414F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6672A275-AD57-4791-A606-A69AE279414F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6672A275-AD57-4791-A606-A69AE279414F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {0BBDE288-4628-43F7-9D0F-CB050B9D1516} + EndGlobalSection +EndGlobal diff --git a/ManyMethods/Program.cs b/ManyMethods/Program.cs new file mode 100644 index 00000000..cdc8e500 --- /dev/null +++ b/ManyMethods/Program.cs @@ -0,0 +1,183 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ManyMethods +{ + class Program + { + static void Main(string[] args) + { + hello(); + addition(); + catDog(); + oddEvent(); + height(); + echo(); + kilograms(); + date(); + age(); + guess(); + + } + + + + + + + + public static void hello() + { + Console.Write("Hello! What's your name? : "); + string Name = Console.ReadLine(); + Console.WriteLine("It's nice to meet you, {0}", Name); + Console.WriteLine(); + } + + + ///This is the calculator, which asks for two numbers to add and returns the sum + public static void addition() + { + Console.Write("Let's do some addition! Please give me a number: "); + int Num1 = Convert.ToInt32(Console.ReadLine()); + Console.Write("Please give me another number: "); + int Num2 = Convert.ToInt32(Console.ReadLine()); + int Sum = Num1 + Num2; + Console.Write("The sum of those two numbers is {0}", Sum); + Console.WriteLine(); + Console.WriteLine(); + } + + + ///Asks if the user is a dog or a cat person and responds appropriately + public static void catDog() + { + Console.Write("Do you like dogs or cats? Type D for dogs or C for cats: "); + char pet = Convert.ToChar(Console.ReadLine()); + if (pet == 'd' || pet == 'D') + { + Console.Write("Me too! Woof Woof! U・x・U"); + } + else if (pet == 'c' || pet == 'C') + { + Console.Write("Me too! Meoooow! =^_^="); + } + else + { + Console.Write("I don't recognize that animal. Is that a kind of fish? <><"); + } + Console.WriteLine(); + Console.WriteLine(); + } + + + ///Asks for a number, then declares if it's even or odd. + public static void oddEvent() + { + Console.Write("Please give me a number. I can tell you if it's even or odd: "); + int EvOd = Convert.ToInt32(Console.ReadLine()); + int result = EvOd % 2; + if (result == 0) + { + Console.Write("That's an even number! Cool!"); + } + else if (result == 1) + { + Console.Write("That's an odd number! Excellent!"); + } + else + { + Console.Write("Sorry, invalid input :( "); + } + Console.WriteLine(); + Console.WriteLine(); + } + public static void height() + { + Console.Write("I can tell you your height in inches!"); + Console.Write("How many feet tall are you?:"); + int feetIn = Convert.ToInt32(Console.ReadLine()); + int resFeet = feetIn * 12; + Console.WriteLine("In inches, that's {0}" ,resFeet); + Console.WriteLine(); + Console.WriteLine(); + } + + public static void echo() + { + Console.Write("I can make an echo! Please give me a word: "); + string Word = Console.ReadLine(); + string upWord = Word.ToUpper(); + string downWord = Word.ToLower(); + Console.Write(upWord); + Console.Write(downWord); + Console.Write(downWord); + Console.WriteLine(); + Console.WriteLine(); + + } + + public static void kilograms() + { + Console.Write("I know how to convert pounds to kilograms. Can you give me a weight in pounds?: "); + double lbs = Convert.ToDouble(Console.ReadLine()); + double kilo = lbs / 2.205; + Console.Write("In kilograms, that would be about {0}", kilo); + Console.WriteLine(); + Console.WriteLine(); + } + public static void date() + { + DateTime today = DateTime.Now; + string now = Convert.ToString(DateTime.Now.ToShortDateString()); + Console.Write("By the way, today is {0}" ,now); + Console.WriteLine(); + Console.WriteLine(); + } + + public static void age() + { + Console.Write("Let's see if I can figure out your age. What year were you born?: "); + int year = Convert.ToInt32(Console.ReadLine()); + int age = 2019 - year; + Console.Write("So you are or are close to {0} ", age); + Console.WriteLine(); + Console.WriteLine(); + + } + + public static void guess() + { + string correctWord = "csharp"; + bool correct = false; + + + Console.Write("I'm thinking of a word..."); + Console.Write("Enter your guess: "); + + while (correct != true) + { + string userGuess = Console.ReadLine(); + + if (userGuess == correctWord || userGuess == "csharp") + { + Console.Write("Correct! Thanks for playing with me :)"); + correct = true; + + } + else + { + Console.Write("Sorry! Please try again: "); + + + } + + } + Console.Read(); + } + } +} + diff --git a/ManyMethods/Properties/AssemblyInfo.cs b/ManyMethods/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..5fb3f1ea --- /dev/null +++ b/ManyMethods/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ManyMethods")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ManyMethods")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6672a275-ad57-4791-a606-a69ae279414f")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/igPayAtinLay/.vs/igPayAtinLay/DesignTimeBuild/.dtbcache b/igPayAtinLay/.vs/igPayAtinLay/DesignTimeBuild/.dtbcache new file mode 100644 index 00000000..54e83d83 Binary files /dev/null and b/igPayAtinLay/.vs/igPayAtinLay/DesignTimeBuild/.dtbcache differ diff --git a/igPayAtinLay/.vs/igPayAtinLay/v16/.suo b/igPayAtinLay/.vs/igPayAtinLay/v16/.suo new file mode 100644 index 00000000..d123cd79 Binary files /dev/null and b/igPayAtinLay/.vs/igPayAtinLay/v16/.suo differ diff --git a/igPayAtinLay/.vs/igPayAtinLay/v16/Server/sqlite3/db.lock b/igPayAtinLay/.vs/igPayAtinLay/v16/Server/sqlite3/db.lock new file mode 100644 index 00000000..e69de29b diff --git a/igPayAtinLay/.vs/igPayAtinLay/v16/Server/sqlite3/storage.ide b/igPayAtinLay/.vs/igPayAtinLay/v16/Server/sqlite3/storage.ide new file mode 100644 index 00000000..5853400a Binary files /dev/null and b/igPayAtinLay/.vs/igPayAtinLay/v16/Server/sqlite3/storage.ide differ diff --git a/igPayAtinLay/Program.cs b/igPayAtinLay/Program.cs new file mode 100644 index 00000000..f5018f1b --- /dev/null +++ b/igPayAtinLay/Program.cs @@ -0,0 +1,42 @@ +using System; + +namespace igPayAtinLay +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("I can transate any sentence into Pig Latin. What sentence would you like me to translate?: "); + Console.WriteLine(); + string sentence = Console.ReadLine(); + string pigLatin = ToPigLatin(sentence); + Console.Write(pigLatin); + Console.Read(); + } + static string ToPigLatin(string sentence) + { + + const string vowels = "AEIOUaeio"; + System.Collections.Generic.List pigWords = new System.Collections.Generic.List(); + + foreach (string word in sentence.Split(' ')) + { + string firstLetter = word.Substring(0, 1); + string restOfWord = word.Substring(1, word.Length - 1); + int currentLetter = vowels.IndexOf(firstLetter); + + if (currentLetter == -1) + { + pigWords.Add(restOfWord + firstLetter + "ay"); + } + + else + { + pigWords.Add(word + "yay"); + } + } + return string.Join(" ", pigWords); + + } + } +} diff --git a/igPayAtinLay/igPayAtinLay.csproj b/igPayAtinLay/igPayAtinLay.csproj new file mode 100644 index 00000000..21dff5ca --- /dev/null +++ b/igPayAtinLay/igPayAtinLay.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp2.2 + + + diff --git a/igPayAtinLay/igPayAtinLay.sln b/igPayAtinLay/igPayAtinLay.sln new file mode 100644 index 00000000..c2dab786 --- /dev/null +++ b/igPayAtinLay/igPayAtinLay.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29009.5 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "igPayAtinLay", "igPayAtinLay.csproj", "{CEFAE7DE-C561-4109-8E4D-837AB14279CA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CEFAE7DE-C561-4109-8E4D-837AB14279CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CEFAE7DE-C561-4109-8E4D-837AB14279CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CEFAE7DE-C561-4109-8E4D-837AB14279CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CEFAE7DE-C561-4109-8E4D-837AB14279CA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A83C4F8D-93AB-4B87-B70D-761E81E8A4EF} + EndGlobalSection +EndGlobal