Skip to content

Instantly share code, notes, and snippets.

@janellbaxter
Created February 20, 2017 19:48
9.3 For Loops; Programming is Fun: C# Adventure Game (Learn C#)
using System;
namespace Lunch
{
class Program
{
static void Main()
{
string[] lunch = new string[3];
lunch[0] = "sandwich";
lunch[1] = "drink";
lunch[2] = "apple";
for (int i = 0; i < lunch.Length; i++)
{
Console.WriteLine("The value at " + i + " is " + lunch[i]);
}
Console.ReadKey();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment