Thread:SamwiseFilmore/@comment-30645975-20170115043219

So after seeing these datas, I decided to make it a project. I have now, after one day of working on and off, made a D script to find the price range given the JDGui average price! My code is as follows: {{Spoiler| import std.stdio;

void main { bool done = false; while (done == false) { real itemPrice; writeln(" "); writeln("Price of item?"); readf(" %s", &itemPrice); if (itemPrice % 2 == 0) { real evenAverage = (itemPrice / 2); if ((evenAverage % 2 == 0)){ real EvenDiff = (evenAverage / 2); real EvenLarge = (itemPrice + EvenDiff); real EvenSmall = (itemPrice - EvenDiff); writeln("Low Number: ", EvenSmall, " High Number: ", EvenLarge); }		else if (itemPrice == 2){ writeln("Low Number: 1 ", " High Number: 3"); }		else { real evenDiff = ((evenAverage / 2) + 0.5); real evenLarge = (itemPrice + evenDiff); real evenSmall = ((itemPrice - evenDiff) +1 ); writeln("Low Number: ", evenSmall, " High Number: ", evenLarge); }	}		else{ real oddAverage = ((itemPrice) / 2 + 0.5); if ((oddAverage % 2) != 0){ real oddDiffA = ((oddAverage / 2) + 0.5); real oddDiffB = ((oddAverage / 2) - 0.5); real oddLarge = (itemPrice + oddDiffA); real oddSmall = (itemPrice - oddDiffB); writeln("Low Number: ", oddSmall, " High Number: ", oddLarge); else { real OddDiffA = (oddAverage / 2); real }	}	} } }} This post is kinda to show off what I did, but also to share it with anyone who needs to calculate prices, and I figured you could check it to make sure it's good (I had to build in a special case because it wasn't working for 2) So that is my first successful project with D!

 