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 2021

    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:


  • MY solution I made.



    using System;


    namespace My_First_Project

    {

        class Program

        {

            static void Main(string[] args)

            {

            // Setting Things Up

            Console.Title = ("A short Story");

            Console.WindowHeight = 40;

            // Printing the Story out

            Console.WriteLine("A giant dragon is descending upon the castle, You are a Knight, and you must defend against the Dragon \nWhat is your name?");

            Console.ReadLine();

            Console.WriteLine("You slash the dragon with...");

            Console.ReadLine();

            Console.WriteLine("It does nothing! The dragon rains firey breath upon the castle. \nWhat do you use to block the fire from burning you?");

            Console.ReadLine();

            Console.ForegroundColor = ConsoleColor.Red;

            Console.WriteLine("The Fire is so hot it melts everything, even the rocky castle turns into lava.\nIt Melts your item you used, and you die.");

            Console.WriteLine("\n\n\n\n\n\n\n\n\n\n\n\n\n THE END ");

            Console.ReadKey();

             }

        }

    }

  • My Solution to Challenge 1:

    using System;


    namespace yeet_le_program

    {

        class Challenge1

        {      

             static void Main(string[] args)

            {

                Console.Title = "Challenge-1";


                Console.WriteLine("Once, there was a pig named...");


                Console.ReadLine();


                Console.WriteLine("It's job was too...");


                Console.ReadLine();


                Console.WriteLine("One day it met a...");


                Console.ReadLine();


                Console.WriteLine("...which followed it to work...");


                Console.ForegroundColor = ConsoleColor.Red;

                Console.WriteLine("But the pig lost its job.");


                Console.ReadKey();


            }            

        }

    }

       

  • My solution to challenge 1.


    using System;


    namespace Code_Relearn_Camp

    {

        class Program

        {

            static void Main(string[] args)

            {

                Console.Title = "ValorantProtocol";

                Console.ForegroundColor = ConsoleColor.Gray;

                Console.WindowHeight = 25;

                Console.WindowWidth = 65;


                Console.WriteLine("A woman named...");


                Console.ReadLine();


                Console.WriteLine("... had powers to control...");


                Console.ReadLine();


                Console.WriteLine("...but even though she thought she would use them for good she eventually had to fight a...");


                Console.ReadLine();


                Console.WriteLine("...which made her unlock her ultimate ability...");


                Console.ReadLine();


                Console.ForegroundColor = ConsoleColor.DarkRed;


                Console.WriteLine("...that made the city react unusually. \n THE END.");


                Console.ReadKey();

                //To make sure that this doesn't close immediately.

            }

        }

    }


  • KurRuppted


    using System;

    using System.Collections.Generic;

    using System.Linq;


    namespace MyApp // Note: actual namespace depends on the project name.

    {

    public class Program

    {

    public static void Main(string[] args)

    {

    Console.ForegroundColor = ConsoleColor.Green;


    Console.WriteLine("Pssst");


    Console.ReadLine();


    Console.WriteLine("Wanna hear a great joke");


    Console.ReadLine();


    Console.WriteLine("Let's Go and run our first program");


    Console.WriteLine("runs with a computer, keyboard, mouse, and desktop with a c# file open");



    Console.ReadKey();

    }

    }

    }

Sign In or Register to comment.