
Call 1800-123-2003
"Smartindia is the best online tool for school students." Ms Deepa Chandran, Principal Anchal
"Smartindia is one of the best supplementary education tool for school students." Ms Pooja, Principal
HOW TO WRITE A C++ PROGRAMME TO FIND THE AREA OF A TRIANGLE |
#include<iostream.h> #include<conio.h> #include<math.h> void main() { int a,b,c; float s,A; float x=1/2; clrscr(); cout<<"Enter three sides of a triangle\n"; cin>>a>>b>c; s=(a+b+c)/2; A=pow((s(s-a)(s-b))(s-c)),x); cout<<"AREA OF TRIANGLE\n"<<A; getch(); } |