Created
February 4, 2017 11:58
-
-
Save mallibone/6d5dfe1f888aa08e75dd937db5ce4ce0 to your computer and use it in GitHub Desktop.
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
using System; | |
namespace ConsoleApplication | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
while (new Random().Next(0, 50) > 50) | |
{ | |
Console.WriteLine("While... Random seems to be bellow 50."); | |
} | |
do | |
{ | |
Console.WriteLine("Do While... Random seems to be bellow 50."); | |
} | |
while (new Random().Next(0, 50) > 50); | |
for (int i = 0; i < 10; i++) | |
{ | |
Console.WriteLine($"Current index is {i}"); | |
} | |
var items = new[] { "Donna", "Harvey", "Rahel", "Mike" }; | |
foreach (var item in items) | |
{ | |
Console.WriteLine($"Hello {item}"); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment