using System;
namespace ItsLifeJim
{
///
class Class1
{
static void Main(string[] args)
{
const int theMeaningOfLife = 42;
int chickens = 2;
int chickenMomas = 0;
long youHaveToBeKiddingThatManyChickens = 9999999999999999;
Console.WriteLine("How fertile are you chickens! 1 is low 10 is rockin'");
int howCoolAreYourCocks = Convert.ToInt32(Console.ReadLine());
while (chickens < youHaveToBeKiddingThatManyChickens)
{
int chickenLove = howHornyAreOurChickens();
chickens = chickens + chickensGetItOn(chickens, chickenLove, howCoolAreYourCocks);
chickens = howThickAreChickens(chickens);//The chickens cross the road
int haveWeFoundIt = chickens % theMeaningOfLife;
if (haveWeFoundIt == 0)
{
Console.WriteLine("Your faithfull chickens found the meaning of life! It took {0} Chickens and {1} generations of Chickens to find", chickens, chickenMomas);
break;
}
else
{
Console.WriteLine("It took {0} Chickens & {1} generations of Chickens NOT to find the meaning of life!", chickens, chickenMomas);
}
chickenMomas++;
}
Console.ReadLine();
}
static int aRandomNumberBetween1And10()
{
int itsRandom;
Random randomNum = new Random();
itsRandom = randomNum.Next(1,9);
return itsRandom;
}
static int howHornyAreOurChickens()
{
int hubbaHubba = aRandomNumberBetween1And10();
return hubbaHubba;
}
static int chickensGetItOn(int multiChickens, int hotOrColdDarlin, int howCoolAreYourCocks)
{
int studValue = howCoolAreYourCocks;
int impregnationQuality = hotOrColdDarlin * studValue;
int justWatchTheOffspring = multiChickens * impregnationQuality;
return justWatchTheOffspring;
}
static int howThickAreChickens(int allDemChickens)
{
int aFewChickensLess;
int chickenSlaughterValue = aRandomNumberBetween1And10() * 10;
aFewChickensLess = allDemChickens-((chickenSlaughterValue*allDemChickens)/100);
return aFewChickensLess;
}
}
}