Created
November 18, 2014 14:11
-
-
Save stevecooperorg/61acc1ad0b56bfc04a9b to your computer and use it in GitHub Desktop.
Hello, $person
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace HelloStuff | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
String question; | |
question = "What is your name?"; | |
String username; | |
Console.WriteLine(question); | |
username = Console.ReadLine(); | |
String greeting = "Hi, " + username; | |
switch (username) | |
{ | |
case "Gretta": Console.WriteLine("Guten abend, " + username + "!!!"); | |
break; | |
case "Pierre": Console.WriteLine("Bonjour, " + username + "!!!"); | |
break; | |
default: Console.WriteLine(greeting); | |
break; | |
} | |
/* | |
if (username == "Gretta") | |
{ | |
Console.WriteLine("Guten abend, " + username + "!!!"); | |
} | |
else if (username == "Pierre") | |
{ | |
Console.WriteLine("Bonjour, " + username + "!!!"); | |
} | |
else | |
{ | |
// Console.WriteLine(greeting); | |
} */ | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment