Console.Write("Please type in the first floating point number: ");
double floating_1 = Convert.ToDouble(Console.ReadLine());
Console.Write("Please type in the second floating point number: ");
double floating_2 = Convert.ToDouble(Console.ReadLine());
double product = floating_1 * floating_2;
double difference = floating_1 - floating_2;
double sum = floating_1 + floating_2;
Console.WriteLine("The product of the two floating point numbers is: " + product + "\nThe sum of the two floating point numbers is: " + sum + "\nThe difference between the two floating point numbers is: " + difference);
Console.ReadLine();
私はこのコードを持っています。プログラムを実行するたびに、小数が正しく表示されません (数字のように: 45.23 は 4523 として表示されます)。