Home > Back-end >  Why doesn't it run
Why doesn't it run

Time:04-04

#include
#include
Void main ()
{
Int a, b, c;
Double area, s;
Printf (" please enter the three sides of the triangle a, b, c: \ n ");
The scanf (" % d % d % d \ n ", & amp; A, & amp; B, & amp; C);
If (a + b> C& & A + c> B& & B + c> A)
{
S=(a + b + c) * 0.5;
Area=SQRT (s * (s - a) * (s - b) * (s - c));
Printf (" % 2 f \ n ", area);
If (a * a==b + c * b * c | |==a * b * b a + c * c | | c * c==a * a * b * b)
Printf (" this triangle is a right triangle \ n ");
Else if (a==b | | a==c | |==b, c)
Printf (" the triangle as an isosceles triangle \ n ");
Else if (a==b) & amp; & (b==c))
Printf (" this triangle is an equilateral triangle \ n ");
The else
Printf (" the triangle is a regular triangle \ n ");
}
The else
Printf (" do not constitute triangle \ n ");
}

CodePudding user response:

There is an error in this sentence:
 the scanf (" % d % d % d ", & amp; A, & amp; B, & amp; C);//the scanf (" % d % d % d \ n ", & amp; A, & amp; B, & amp; C); 

CodePudding user response:

Why to add in front of the backslash

CodePudding user response:

Added the \ n and useless, and still can't run
  • Related