0_0_20199943_3862.cpp:3:1: error: expected ';' before 'void'
void main()
^
0_0_20199943_3862.cpp:3:11: error: '::main' must return 'int'
void main()
^
0_0_20199943_3862.cpp: In function 'int main()':
0_0_20199943_3862.cpp:13:6: error: conflicting declaration 'int a'
int a=0,d=0,flag=0;
^
0_0_20199943_3862.cpp:7:6: note: previous declaration as 'int a [3]'
int a[3];
^
0_0_20199943_3862.cpp:14:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
for(;a<(sum/n);a++)
^
0_0_20199943_3862.cpp:14:18: error: lvalue required as increment operand
for(;a<(sum/n);a++)
^
0_0_20199943_3862.cpp:18:10: error: invalid operands of types 'int' and 'int [3]' to binary 'operator*'
if((n*a+n*(n-1)*d/2)==sum)
^
0_0_20199943_3862.cpp:26:9: error: 'yes' was not declared in this scope
cout<<yes;
^
0_0_20199943_3862.cpp:28:9: error: 'no' was not declared in this scope
cout<<no;
^
|