Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 54 additions & 8 deletions HelloWorld/HelloWorld.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,58 @@
using System;

namespace HelloWorld

public class Program
{
class Program
public static void Main()
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}

string adjective1 = "";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is nothing wrong with this, but you did not need to initialize all the strings to "" ahead of time.
You could have instantiated the String at the same time you read the value from the console.

string adjective2 = "";
string adjective3 = "";
string adjective4 = "";
string adjective5 = "";
string verbEndingInIng = "";
string number = "";
string pluralNoun1 = "";
string pluralNoun2 = "";
string pluralNoun3 = "";
string pluralNoun4 = "";
string pluralNoun5 = "";
string relative = "";
string verb1 = "";
string verb2 = "";

Console.WriteLine("Enter a verb: ");
verb1 = Console.ReadLine();
Console.WriteLine("Enter an adjective: ");
adjective1 = Console.ReadLine();
Console.WriteLine("Enter a plural Noun: ");
pluralNoun1 = Console.ReadLine();
Console.WriteLine("Enter an adjective: ");
adjective2 = Console.ReadLine();
Console.WriteLine("Enter an verb ending in ing: ");
verbEndingInIng = Console.ReadLine();
Console.WriteLine("Enter a verb: ");
verb2 = Console.ReadLine();
Console.WriteLine("Enter a number: ");
number = Console.ReadLine();
Console.WriteLine("Enter an adjective: ");
adjective3 = Console.ReadLine();
Console.WriteLine("Enter a plural Noun: ");
pluralNoun2 = Console.ReadLine();
Console.WriteLine("Enter a plural Noun: ");
pluralNoun3 = Console.ReadLine();
Console.WriteLine("Enter a plural Noun: ");
pluralNoun4 = Console.ReadLine();
Console.WriteLine("Enter a type of plural relative: ");
relative = Console.ReadLine();
Console.WriteLine("Enter an adjective: ");
adjective4 = Console.ReadLine();
Console.WriteLine("Enter an adjective: ");
adjective5 = Console.ReadLine();
Console.WriteLine("Enter a plural Noun: ");
pluralNoun5 = Console.ReadLine();

Console.WriteLine("Come {0} at WALMART, where you`ll receive {1} discounts on all of your favorite brand name {2}. Our {3} and {4} associates are there to {5} you {6} hours a day. Here you will find {7} prices on the {8} you need. {9} for the moms, {10} for the kids and all the latest electronics for the {11}. So come on down to your {12} {13} WALMART where the {14} come first.", verb1, adjective1, pluralNoun1, adjective2, verbEndingInIng, verb2, number, adjective3, pluralNoun2, pluralNoun3, pluralNoun4, relative, adjective4, adjective5, pluralNoun5);
}
}