public static void Main(string[]args)
Console.WriteLine(" Welcome to my coin toss game!"); Console.WriteLine();
Console.WriteLine("My program will flip a coin for you and then you will try to guess which side the coin lands on. You have 10 tries");
Console.WriteLine("If you guess correctly 6 times then you win"); Console.WriteLine("If you guess incorrectly five times then you play again"); Console.WriteLine("If you guess incorrectly six times then you lose"); Console.WriteLine();
Console.WriteLine("Please input your name");
name = Console.ReadLine();
Random randoms = new Random();
for( i = 1; i <= 10; i++)
rand = randoms.Next(0, 2);
Console.WriteLine("rand is " + rand + " you are in the " + i + " loop"); Console.WriteLine(name + ", 0 is for heads, 1 is for tails");
Console.WriteLine(name + ", please guess heads or tails by selecting 0 for heads or 1 for tails");
choice = int.Parse(Console.ReadLine());
Console.WriteLine(name + ", you got it!");
Console.WriteLine(name + ", sorry");
Console.WriteLine("Congrats " + name + " you won! You had " + success + " success.");
Console.WriteLine("Sorry!" + name + " Please play again You had " + success + " success.");
Console.WriteLine("Sorry!" + name + " you lost. You had " + success + " correct.");