Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

BRACKEYS - Solution to C# Tutorial 01 Challenge

2»

Comments

  • LSG_MarkLSG_Mark Member
    edited April 28

    My Submission for the Assignment 01:

    using System;

    namespace My_Awsome_Program

    {

        class Program

        {

            static void Main(string[] args)

            {

                //Create name var


                string name;

                //Change the appearance of the console


                Console.Title = "Bad Jokes";

                Console.ForegroundColor = ConsoleColor.DarkYellow;

                Console.WindowHeight = 40;

                Console.WindowWidth = 120;

                

                //Get users name


                Console.WriteLine("Hello, What's your Name");


                Console.ForegroundColor = ConsoleColor.White;

                name = Console.ReadLine();


                //Start Knock Knock joke

                Console.ForegroundColor = ConsoleColor.DarkYellow;

                Console.WriteLine("Knock, Knock");

                

                Console.ForegroundColor = ConsoleColor.White;

                Console.ReadLine();

                

                Console.ForegroundColor = ConsoleColor.DarkYellow;

                Console.WriteLine("Roach");


                Console.ForegroundColor = ConsoleColor.White;

                Console.ReadLine();


                Console.ForegroundColor = ConsoleColor.DarkYellow;

                Console.WriteLine("Roach you an email last week " + name + " Still waiting for your response!");


                Console.ForegroundColor = ConsoleColor.Red;

                Console.WriteLine("HA, HA, HA, HA!");



                Console.ReadKey();

            }

        }

    }


    Output:


Sign In or Register to comment.