C 语言实例 - 两个浮点数相乘
C 语言教程
· 2019-02-20 14:41:30
输入两个浮点数,计算乘积。
实例
#include <stdio.h>
int main()
{
double firstNumber, secondNumber, product;
printf("输入两个浮点数: ");
// 用户输入两个浮点数
scanf("%lf %lf", &firstNumber, &secondNumber);
// 两个浮点数相乘
product = firstNumber * secondNumber;
// 输出结果, %.2lf 保留两个小数点
printf("结果 = %.2lf", product);
return 0;
}
运行结果:
输入两个浮点数: 1.2 2.345 结果 = 2.81
点击查看所有 C 语言教程 文章: https://codercto.com/courses/l/17.html
Approximation Algorithms
Vijay V. Vazirani / Springer / 2001-07-02 / USD 54.95
'This book covers the dominant theoretical approaches to the approximate solution of hard combinatorial optimization and enumeration problems. It contains elegant combinatorial theory, useful and inte......一起来看看 《Approximation Algorithms》 这本书的介绍吧!