Last active
February 22, 2017 19:01
-
-
Save janellbaxter/9d08f5e1ab62f9a7ad9d3898a1534606 to your computer and use it in GitHub Desktop.
9.4 For Each; Programming is Fun: C# Adventure Game (Learn C#)
This file contains 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
/* | |
* [Your Title] | |
* by Your Name, Date | |
* | |
* This work is a derivative of | |
* "C# Adventure Game" by http://programmingisfun.com, used under CC BY. | |
* https://creativecommons.org/licenses/by/4.0/ | |
*/ | |
using System; | |
namespace GroceryList | |
{ | |
class Program | |
{ | |
static void Main() | |
{ | |
Console.Title = "Write Each Element in Array"; | |
string[] items = { | |
"banana", | |
"orange", | |
"avocado", | |
"pretzels", | |
"lemon", | |
"pecans" | |
}; | |
foreach (string element in items) | |
{ | |
Console.WriteLine(element); | |
} | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment