This commit is contained in:
Geir Okkenhaug Jerstad 2024-11-14 14:08:38 +01:00
parent ddc33e2beb
commit 95d3a2be13
4 changed files with 82 additions and 1 deletions

View file

@ -0,0 +1,16 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Random", "Random\Random.csproj", "{94A6C03C-25AE-4D33-97EB-E732F895D396}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{94A6C03C-25AE-4D33-97EB-E732F895D396}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94A6C03C-25AE-4D33-97EB-E732F895D396}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94A6C03C-25AE-4D33-97EB-E732F895D396}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94A6C03C-25AE-4D33-97EB-E732F895D396}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,24 @@
using System;
namespace Random
{
class Random
{
static void Main(string[] args)
{
System.Random rnd = new System.Random();
int randomnr = rnd.Next(0, 3);
if (randomnr == 0)
{
Console.WriteLine("Tallet ble 0");
}else if (randomnr == 1)
{
Console.WriteLine("Tallet ble 1");
}
else
{
Console.WriteLine("Tallet ble 2");
}
}
}
}

View file

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>