25 lines
325 B
C++
25 lines
325 B
C++
#include <math.h>
|
|
|
|
void setup() {
|
|
// put your setup code here, to run once:
|
|
Serial.begin(9600);
|
|
|
|
float area, p, a, b, c;
|
|
|
|
a = 3;
|
|
b = 4;
|
|
c = 5;
|
|
|
|
p = (a + b + c) / 2;
|
|
|
|
area = sqrt(p * (p - a) * (p - b) * (p - c));
|
|
|
|
Serial.println(area);
|
|
|
|
}
|
|
|
|
void loop() {
|
|
// put your main code here, to run repeatedly:
|
|
|
|
}
|