RND
This commit is contained in:
parent
ddc33e2beb
commit
95d3a2be13
4 changed files with 82 additions and 1 deletions
24
Emne 3/ConsoleApp5/Random/Program.cs
Normal file
24
Emne 3/ConsoleApp5/Random/Program.cs
Normal 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue