-
-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86afa6f
commit 746d547
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Globalization; | ||
|
||
class Program | ||
{ | ||
private static void Main(string[] args) | ||
{ | ||
{ | ||
string input = ""; | ||
|
||
while (input.ToLower() != "coffee") | ||
{ | ||
Console.WriteLine("Please input Coffee or COFFEE: "); | ||
input = Console.ReadLine()!; | ||
if (input.ToLower() == "coffee") | ||
{ | ||
Console.WriteLine(ToTitleCase("code")); | ||
} | ||
} | ||
Environment.Exit(0); | ||
} | ||
} | ||
|
||
private static string ToTitleCase(string str) | ||
{ | ||
var textInfo = new CultureInfo("en-US", false).TextInfo; | ||
return textInfo.ToTitleCase(str); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
</Project> |