forked from AustinCodingAcademy/csharp-workbook
-
Notifications
You must be signed in to change notification settings - Fork 0
Making Hello World personalized #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mtrich
wants to merge
3
commits into
master
Choose a base branch
from
week1-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| 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 = ""; | ||
| 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); | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.