#include <stdio.h> #include <math.h> int main() { double a, b, c, s, area; while(scanf("%lf", &a) != EOF&&scanf("%lf", &b) != EOF&&scanf("%lf", &c) != EOF){ s=(a+b+c)/2; area=sqrt(s*(s-a)*(s-b)*(s-c)); printf("a = %d,b = %d,c= %d,",int(a),int(b),int(c)); printf("area = %.3f\n",area); } return 0; }
标签:lf,EOF,area,int,scanf,任务,实验,include From: https://www.cnblogs.com/yukinoshita-/p/17739939.html