F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

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;
         ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-17 01:36:45, Gzip enabled