Compile Error

foo.c: In function ‘main’:
foo.c:4:12: error: expected identifier or ‘(’ before ‘>>’ token
    4 |         int>>n;
      |            ^~
foo.c:5:18: error: ‘cin’ undeclared (first use in this function)
    5 |                  cin>>n;
      |                  ^~~
foo.c:5:18: note: each undeclared identifier is reported only once for each function it appears in
foo.c:5:23: error: ‘n’ undeclared (first use in this function)
    5 |                  cin>>n;
      |                       ^
foo.c:6:20: error: expected ‘(’ before ‘n’
    6 |                 if n>0&&n<109;
      |                    ^
      |                    (
foo.c:7:11: error: ‘cout’ undeclared (first use in this function)
    7 |           cout<<positive;
      |           ^~~~
foo.c:7:17: error: ‘positive’ undeclared (first use in this function)
    7 |           cout<<positive;
      |                 ^~~~~~~~
foo.c:8:11: error: ‘else’ without a previous ‘if’
    8 |           else if n==0;
      |           ^~~~
foo.c:8:19: error: expected ‘(’ before ‘n’
    8 |           else if n==0;
      |                   ^
      |                   (
foo.c:8:16: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
    8 |           else if n==0;
      |                ^~
foo.c:9:19: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
    9 |                   cout<<zero;
      |                   ^~~~
foo.c:9:25: error: ‘zero’ undeclared (first use in this function)
    9 |                   cout<<zero;
      |                         ^~~~
foo.c:10:25: error: ‘else’ without a previous ‘if’
   10 |                         else if n<0&&n>-109;
      |                         ^~~~
foo.c:10:33: error: expected ‘(’ before ‘n’
   10 |                         else if n<0&&n>-109;
      |                                 ^
      |                                 (
foo.c:10:30: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
   10 |                         else if n<0&&n>-109;
      |                              ^~
foo.c:11:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   11 |                                 cout<<negative;
      |                                 ^~~~
foo.c:11:39: error: ‘negative’ undeclared (first use in this function)
   11 |                                 cout<<negative;
      |                                       ^~~~~~~~
foo.c:12:33: error: ‘return0’ undeclared (first use in this function)
   12 |                                 return0;
      |                                 ^~~~~~~

信息

递交者
类型
递交
语言
C
递交时间
2024-04-13 21:40:08
评测时间
2024-04-13 21:40:08
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes