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_13162052_22023.cpp:1:1: error: 'import' does not name a type
 import java.util.Scanner;
 ^
0_0_13162052_22023.cpp:4:12: error: expected ':' before 'static'
     public static void main ( String[] args )
            ^
0_0_13162052_22023.cpp:4:31: error: 'String' has not been declared
     public static void main ( String[] args )
                               ^
0_0_13162052_22023.cpp:4:40: error: expected ',' or '...' before 'args'
     public static void main ( String[] args )
                                        ^
0_0_13162052_22023.cpp:39:1: error: expected ';' after class definition
 }
 ^
0_0_13162052_22023.cpp: In static member function 'static void Main::main(int*)':
0_0_13162052_22023.cpp:6:35: error: initializer fails to determine size of 'num'
         long num[] = new long[1005],sum = 0;
                                   ^
0_0_13162052_22023.cpp:6:35: error: array must be initialized with a brace-enclosed initializer
0_0_13162052_22023.cpp:7:9: error: 'Scanner' was not declared in this scope
         Scanner in = new Scanner ( System.in );
         ^
0_0_13162052_22023.cpp:8:9: error: 'String' was not declared in this scope
         String s ;
         ^
0_0_13162052_22023.cpp:9:9: error: 'Boolean' was not declared in this scope
         Boolean flag = true;
         ^
0_0_13162052_22023.cpp:10:17: error: 'in' was not declared in this scope
         while ( in.hasNext ( ) )
                 ^
0_0_13162052_22023.cpp:12:13: error: 's' was not declared in this scope
             s = in.next ( );
             ^
0_0_13162052_22023.cpp:19:25: error: 'count' was not declared in this scope
                     num[count] = sum;
                         ^
0_0_13162052_22023.cpp:26:34: error: 'count' was not declared in this scope
             for ( int i = 0; i < count; i++ )
                                  ^
0_0_13162052_22023.cpp:34:34: error: 'count' was not declared in this scope
             for ( int i = 0; i < count; i++ )
                                  ^
0_0_13162052_22023.cpp:35:17: error: 'System' was not declared in this scope
                 System.out.print ( i == 0 ? num[i] : " "+num[i] );
                 ^
0_0_13162052_22023.cpp:35:43: error: operands to ?: have different types 'long int' and 'const char*'
                 System.out.print ( i == 0 ? num[i] : " "+num[i] );
                                           ^
0_0_13162052_22023.cpp:36:13: error: 'System' was not declared in this scope
             System.out.println ( );
             ^


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-27 01:24:45, Gzip enabled