Compile Error

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

信息

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