用VS2017编写一个计算三角形面积的函数莫名报错
程序代码:
double triangle_area(double base, double hight) { double product; product = base*hight; return product / 2; } double a, b; scanf_s("%lf,%lf", &a, &b); printf("%lf", triangle_area(a, b));
#include<stdio.h> double triangle_area(double base, double hight) { double product; product = base*hight; return product / 2; } int main() { double a, b; scanf_s("%lf,%lf", &a, &b); printf("%lf", triangle_area(a, b)); reutnrn 0; }
[此贴子已经被作者于2017-9-10 23:46编辑过]