Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added HelloWorld/.vs/HelloWorld/v16/.suo
Binary file not shown.
6 changes: 6 additions & 0 deletions HelloWorld/.vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
Binary file added HelloWorld/.vs/slnx.sqlite
Binary file not shown.
2 changes: 1 addition & 1 deletion HelloWorld/HelloWorld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Console.WriteLine("Hello Worlds!");
}
}
}
Binary file added ManyMethods/.vs/ManyMethods/v16/.suo
Binary file not shown.
Empty file.
Binary file not shown.
6 changes: 6 additions & 0 deletions ManyMethods/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>
53 changes: 53 additions & 0 deletions ManyMethods/ManyMethods.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{6672A275-AD57-4791-A606-A69AE279414F}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ManyMethods</RootNamespace>
<AssemblyName>ManyMethods</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
25 changes: 25 additions & 0 deletions ManyMethods/ManyMethods.sln
Original file line number Diff line number Diff line change
@@ -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
183 changes: 183 additions & 0 deletions ManyMethods/Program.cs
Original file line number Diff line number Diff line change
@@ -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();
}
}
}

36 changes: 36 additions & 0 deletions ManyMethods/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -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")]
Binary file not shown.
Binary file added igPayAtinLay/.vs/igPayAtinLay/v16/.suo
Binary file not shown.
Empty file.
Binary file not shown.
42 changes: 42 additions & 0 deletions igPayAtinLay/Program.cs
Original file line number Diff line number Diff line change
@@ -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<string> pigWords = new System.Collections.Generic.List<string>();

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);

}
}
}
8 changes: 8 additions & 0 deletions igPayAtinLay/igPayAtinLay.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

</Project>
Loading