double angle = .50, stop = .59;
Console.WriteLine(" Angle Sine Cosine");
while (angle <= stop)
{
CalculateSineAndCosine(angle, out sine, out cosine);
Console.WriteLine($"{angle,6:F}{sine,10:F4}{cosine,9:F4}");
angle += .01;
}
The last loop only get to 0.58 instead of 0.59. Can't understand what happened. Please help. P.S. If stop = 0.60, it will reach 0.59. But that happened when I still use <= not <