Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Lotto unieke getallen
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int getal; int rounds = 1; Random rnd = new Random(); Console.WriteLine("De 6 LOTTO-getallen zijn:"); string seenNumbers = ":"; getal = rnd.Next(1,46); seenNumbers = string.Concat(seenNumbers,getal,":"); do{ if(rounds != 1){ getal = rnd.Next(1,46); while(seenNumbers.Contains(string.Format(":{0}:", getal))){ getal = rnd.Next(1,46); }; seenNumbers = string.Concat(seenNumbers,getal,":"); } Console.WriteLine("Getal: {0}", getal); rounds++; } while(rounds <= 6); } } }
run
|
edit
|
history
|
help
0
Importent Gen_Coverent Example-1
Store reference to a object
linqs
Math 11.0 Finished fracOp
MIXED CONTENT - string and numbers separation in a large string
Easter Holiday Calculator
Abstract Class
Comp4.1
my sql
Crystals Plep