using System.Linq.Expressions;
using System.Collections.Generic;
static Random random = new Random();
public static void Main()
double currentResult = GetCurrentResult();
if(currentResult > maxResult)
maxResult = currentResult;
if(currentResult < minResult)
minResult = currentResult;
Console.WriteLine("Curent Result " + currentResult);
Console.WriteLine("Max Result " + maxResult);
Console.WriteLine("Min Result " + minResult);
private static double GetCurrentResult()
double sample = random.NextDouble();
return (maxValue * sample) + (minValue * (1d - sample));