Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
W.I.P (c#)
//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; public class Rextester { public static void Main(string[] args) { int mainVar = 7; int i; int max = 10; int y = 0; var ran = new Random().Next(1,25); Console.WriteLine("Random int = {0}", ran); Console.WriteLine("---------------------"); for (i = 0; i <= ran; i++) { Console.WriteLine("Tested {0} times.", i); } Console.WriteLine("---------------"); for ( ; ;){ int x = new Random().Next(1,max); System.Threading.Thread.Sleep(200); // Wait func y = y + 1; if (x == 7){ Console.WriteLine("---------------"); Console.WriteLine("{0} = {1} max num = {2}", x, mainVar, max); Console.WriteLine("Finished on attempt {0}", y); break; } else{ Console.WriteLine("{0} ~= {1} max = {2}", x, mainVar, max); } } } }
run
|
edit
|
history
|
help
0
Is first character of MD5 hash evenly distributed?
int array element change with xor
ObjectPool
binary
Par ou ímpar input
asdxsxsd
divisão
Math 10.9 edited makeMultQ
sdfrgthyjhtgrfedcd
ANQ Bug with Feb month display