Compile Error

foo.cc:6:1: error: extended character   is not valid in an identifier
    6 |     int a, b, c;
      | ^
foo.cc:6:1: error: extended character   is not valid in an identifier
foo.cc:6:1: error: extended character   is not valid in an identifier
foo.cc:7:1: error: extended character   is not valid in an identifier
    7 |     cin >> a >> b >> c;
      | ^
foo.cc:7:1: error: extended character   is not valid in an identifier
foo.cc:7:1: error: extended character   is not valid in an identifier
foo.cc:8:1: error: extended character   is not valid in an identifier
    8 |     if(a > b)swap(a, b);
      | ^
foo.cc:8:1: error: extended character   is not valid in an identifier
foo.cc:8:1: error: extended character   is not valid in an identifier
foo.cc:9:1: error: extended character   is not valid in an identifier
    9 |     if(b > c)swap(b, c);
      | ^
foo.cc:9:1: error: extended character   is not valid in an identifier
foo.cc:9:1: error: extended character   is not valid in an identifier
foo.cc:10:1: error: extended character   is not valid in an identifier
   10 |     if(a+b > c){
      | ^
foo.cc:10:1: error: extended character   is not valid in an identifier
foo.cc:10:1: error: extended character   is not valid in an identifier
foo.cc:11:1: error: extended character   is not valid in an identifier
   11 |         double p = (a+b+c)/2.0;
      | ^
foo.cc:11:1: error: extended character   is not valid in an identifier
foo.cc:11:1: error: extended character   is not valid in an identifier
foo.cc:11:1: error: extended character   is not valid in an identifier
foo.cc:11:1: error: extended character   is not valid in an identifier
foo.cc:11:1: error: extended character   is not valid in an identifier
foo.cc:11:1: error: extended character   is not valid in an identifier
foo.cc:12:1: error: extended character   is not valid in an identifier
   12 |         p = p*(p-a)*(p-b)*(p-c);
      | ^
foo.cc:12:1: error: extended character   is not valid in an identifier
foo.cc:12:1: error: extended character   is not valid in an identifier
foo.cc:12:1: error: extended character   is not valid in an identifier
foo.cc:12:1: error: extended character   is not valid in an identifier
foo.cc:12:1: error: extended character   is not valid in an identifier
foo.cc:12:1: error: extended character   is not valid in an identifier
foo.cc:13:1: error: extended character   is not valid in an identifier
   13 |         printf("%.2lf", sqrt(p));
      | ^
foo.cc:13:1: error: extended character   is not valid in an identifier
foo.cc:13:1: error: extended character   is not valid in an identifier
foo.cc:13:1: error: extended character   is not valid in an identifier
foo.cc:13:1: error: extended character   is not valid in an identifier
foo.cc:13:1: error: extended character   is not valid in an identifier
foo.cc:13:1: error: extended character   is not valid in an identifier
foo.cc:14:1: error: extended character   is not valid in an identifier
   14 |     }else cout << "NO";
      | ^
foo.cc:14:1: error: extended character   is not valid in an identifier
foo.cc:14:1: error: extended character   is not valid in an identifier
foo.cc:15:1: error: extended character   is not valid in an identifier
   15 |     return 0;
      | ^
foo.cc:15:1: error: extended character   is not valid in an identifier
foo.cc:15:1: error: extended character   is not valid in an identifier
foo.cc: In function ‘int main()’:
foo.cc:6:1: error: ‘   ’ was not declared in this scope
    6 |     int a, b, c;
      | ^~~
foo.cc:7:4: error: expected ‘;’ before ‘cin’
    7 |     cin >> a >> b >> c;
      |    ^~~~
      |    ;
foo.cc:8:4: error: expected ‘;’ before ‘if’
    8 |     if(a > b)swap(a, b);
      |    ^~~
      |    ;
foo.cc:9:4: error: expected ‘;’ before ‘if’
    9 |     if(b > c)swap(b, c);
      |    ^~~
      |    ;
foo.cc:10:4: error: expected ‘;’ before ‘if’
   10 |     if(a+b > c){
      |    ^~~
      |    ;
foo.cc:14:6: error: ‘else’ without a previous ‘if’
   14 |     }else cout << "NO";
      |      ^~~~
foo.cc:15:4: error: expected ‘;’ before ‘return’
   15 |     return 0;
      |    ^~~~~~~
      |    ;

信息

递交者
类型
递交
题目
P1701 求三角形面积
语言
C++
递交时间
2024-06-29 18:24:14
评测时间
2024-06-29 18:24:14
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes