User-2060576634 posted
hi folks . I've written this simple code to somehow convert decimals to fractions but I don't know how to exit the loop on first iteration to keep only one result. any ideas?
var share = (float)12 / 13;
for (var i = 1; i < 100; i++)
{
for (var n = 1; n < 100; n++)
{
var fraction= (float)i/n;
if (fraction == share)
{
<p>@i/@n</p>
}
}
}