+ 3
What is error in this code. ?
#include <iostream> using namespace std; int main() { float s1,s2,s3,s,area; cout<<"enter the length of three sides:"; cin>>s1>>s2>>s3; s=(s1+s2+s3)/2; area = sqrt(s*(s-s1)*(s-s2)*(s-s3)); cout<<"Area="<<area<<endl; return 0; }
5 Antworten
+ 5
add this to the top as it's needed for sqrt function:
#include <math.h>
+ 3
You should use <cmath> instead of <math.h>
+ 1
Maybe it would help to do the c++ lessons Collins
0
I don't understand what all these is all about. can someone help Me?. I want to learn C++ and I have zero knowledge of it.
0
ok