0

TA =√s(s-a) (s-b) (s-c) were s =a+b+c/2

i want a program

30th Jan 2017, 5:26 AM
Kumar Yadav
Kumar Yadav - avatar
4 Antworten
+ 8
MATHHH NOOOO RUNNN!!!!
30th Jan 2017, 5:52 AM
Ahri Fox
Ahri Fox - avatar
+ 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
30th Jan 2017, 6:40 AM
bem
bem - avatar
+ 1
You can get the complete Code for this Program on my Profile.
30th Jan 2017, 8:13 AM
Arpan Lunawat
Arpan Lunawat - avatar
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; }
30th Jan 2017, 7:27 AM
ASNM
ASNM - avatar