We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e988ea5 commit 1f4d25cCopy full SHA for 1f4d25c
CSharp/CoinFlip/CoinFlip.csproj
@@ -0,0 +1,10 @@
1
+<Project Sdk="Microsoft.NET.Sdk">
2
+
3
+ <PropertyGroup>
4
+ <OutputType>Exe</OutputType>
5
+ <TargetFramework>net8.0</TargetFramework>
6
+ <ImplicitUsings>enable</ImplicitUsings>
7
+ <Nullable>enable</Nullable>
8
+ </PropertyGroup>
9
10
+</Project>
CSharp/CoinFlip/Program.cs
@@ -0,0 +1,18 @@
+using System;
+namespace Program
+{
+ class Program
+ {
+ static void Main(string[] args)
+ Random rand = new Random();
11
+ int coin = rand.Next(0, 2);
12
13
+ Console.Write("Coin flip result: ");
14
15
+ Console.WriteLine((coin == 0) ? "Heads" : "Tails");
16
+ }
17
18
+}
0 commit comments