求任意三个float数的积的c程序
#include <stdio.h>
int main()
{
float a, b, c; // Declaring three float variables
printf("Enter three numbers:
"); // Taking input from user
scanf("%f%f%f", &a, &b, &c); // Storing the input in variables a, b and c
float product = a * b * c; // Calculating the product of three numbers
printf("Product of three numbers is: %.2f", product); // Printing the result with two decimal places
return 0;
}
免责声明:
以上内容除特别注明外均来源于网友提问,创作工场回答,未经许可,严谨转载。