Quiz of the Month: Double Trouble
Without compiling and running this program. Can you tell me what the output would be?
class MainProgram
{
static void Main(string[] args)
{
double a = Convert.ToDouble("1.170404");
double b = Convert.ToDouble("2.170404");
double c = Convert.ToDouble("3.170404");
double d = Convert.ToDouble("4.170404");
Console.WriteLine((a == 1.170404));
Console.WriteLine((b == 2.170404));
Console.WriteLine((c == 3.170404));
Console.WriteLine((d == 4.170404));
}
}