0
TA =√s(s-a) (s-b) (s-c) were s =a+b+c/2
i want a program
4 Respostas
+ 8
MATHHH NOOOO RUNNN!!!!
+ 1
really s =a+b+c/2 and not s =(a+b+c)/2 ?
double a, b, c;
//Do sth with a, b and c
double s = (a+b+c)/2;
double TA = sqrt(s*(s-a)*(s-b)*(s-c));
pretty straightforward
+ 1
You can get the complete Code for this Program on my Profile.
0
#include <iostream>
#include <cmath>
using namespace std;
int main() {
int a=5;
int b=4;
int c=6;
float s= float((a+b+c))/2;
float TA=sqrt(s*(s-a)*(s-b)*(s-c));
cout <<TA;
return 0;
}