- 2

#include<stdio.h> #include<math.h> int main() { float a,b,c,s,area; printf("ENTER THE THREE SIDES OF A TRIANGLE REPECTIVELY");

Can anybody tell me the mistake in this code

17th Sep 2020, 5:37 AM
MSD
4 Réponses
+ 6
Your code is looking incomplete See this #include<stdio.h> #include<math.h> int main() {   float a, b, c, s, area;   printf("Enter sides of a triangle\n");   scanf("%f%f%f", &a, &b, &c);   s = (a+b+c)/2;   area = sqrt(s*(s-a)*(s-b)*(s-c));   printf("Area of the triangle = %f\n", area);   return 0; }
17th Sep 2020, 6:05 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 3
Tell what u want to do with this program.
17th Sep 2020, 5:41 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 3
#include<stdio.h> #include<math.h> int main() { float a,b,c,s,area; printf("ENTER THE THREE SIDES OF A TRIANGLE REPECTIVELY"); return 0; }
17th Sep 2020, 5:46 AM
Alphin K Sajan
Alphin K Sajan - avatar