Pastebin.no - Hele Norges Pastebin!

Nick:
Dato/tid:10.05.2010 16:00
Språk:
Sponsede Lenker:


001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("UR NAME PLS: ");
            string name = Console.ReadLine();
            while (name != "")
            {
                SayHelloTo(name);
                Console.Write("UR NAME PLS: ");
                name = Console.ReadLine();
            }
            Console.WriteLine("ENTER PLS!!1");
            Console.Read();
        }
        static void SayHelloWorld()
        {
            Console.WriteLine("Hello, world!");
        }
        static void SayHelloTo(string toWhom)
        {
            string message = CalculateGreeting( toWhom );
            Console.WriteLine(message);
        }
        static string CalculateGreeting(string toWhom)
        {
            string message;
            if ( toWhom == "Eric" )
            {
                message = "Hi, " + toWhom;
            }
            else if (toWhom == "Audrey")
            {
                message = "Ahoy, " + toWhom + ", mah skipper!";
            }
            else
            {
                message = "Hello, " + toWhom;
            }
            return message;
        }
    }
}