/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'int main()':
foo.cpp:8:21: error: conflicting declaration 'int a [10]'
     int n,a,b,k,a[10],t,j;
                     ^
foo.cpp:8:11: note: previous declaration as 'int a'
     int n,a,b,k,a[10],t,j;
           ^
foo.cpp:10:5: error: expected ';' before 'cin'
     cin>>n;
     ^
foo.cpp:13:21: warning: statement has no effect [-Wunused-value]
         if(n/a>0)n/a+b;
                     ^
foo.cpp:14:17: error: 'i' was not declared in this scope
         else {a[i]=a/pow(10,10-i);++i;}
                 ^
foo.cpp:16:5: error: expected ';' before 'do'
     do
     ^
foo.cpp:18:13: error: 'i' was not declared in this scope
         t=a[i];
             ^
foo.cpp:19:17: error: invalid types 'int[int]' for array subscript
         a[i]=a[1];
                 ^
foo.cpp:20:12: error: invalid types 'int[int]' for array subscript
         a[1]=t;
            ^
foo.cpp:23:21: error: invalid types 'int[int]' for array subscript
         a[i-j]=a[1+j];
                     ^
foo.cpp:24:14: error: invalid types 'int[int]' for array subscript
         a[1+j]=1;
              ^
foo.cpp:25:16: error: 'i' was not declared in this scope
     } while((a[i]>a[i+1])&&(a[i+1]==0))
                ^
foo.cpp:26:5: error: expected ';' before 'cout'
     cout<<n;
     ^
foo.cpp:27:13: error: expected '}' at end of input
     return 0;
             ^

信息

递交者
类型
递交
题目
P1756 数字反转
语言
C++
递交时间
2015-07-16 17:57:28
评测时间
2015-07-16 17:57:29
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes