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_16024673_2815.cpp:2:10: error: expected constructor, destructor, or type conversion before ';' token
 getchar();
          ^
0_0_16024673_2815.cpp:3:1: error: 'k' does not name a type
 k++; for(i=1;i<=n;i++) { for(j=1;j<n+i;j++) { if(i<=n-1) { if((i+j)==n+1) printf("%c",c); else if(j==(n+i-1)) printf("%c",c); else printf(" "); } else printf("%c",c); } printf("\n"); } } return 0; }
 ^
0_0_16024673_2815.cpp:3:6: error: expected unqualified-id before 'for'
 k++; for(i=1;i<=n;i++) { for(j=1;j<n+i;j++) { if(i<=n-1) { if((i+j)==n+1) printf("%c",c); else if(j==(n+i-1)) printf("%c",c); else printf(" "); } else printf("%c",c); } printf("\n"); } } return 0; }
      ^
0_0_16024673_2815.cpp:3:14: error: 'i' does not name a type
 k++; for(i=1;i<=n;i++) { for(j=1;j<n+i;j++) { if(i<=n-1) { if((i+j)==n+1) printf("%c",c); else if(j==(n+i-1)) printf("%c",c); else printf(" "); } else printf("%c",c); } printf("\n"); } } return 0; }
              ^
0_0_16024673_2815.cpp:3:19: error: 'i' does not name a type
 k++; for(i=1;i<=n;i++) { for(j=1;j<n+i;j++) { if(i<=n-1) { if((i+j)==n+1) printf("%c",c); else if(j==(n+i-1)) printf("%c",c); else printf(" "); } else printf("%c",c); } printf("\n"); } } return 0; }
                   ^
0_0_16024673_2815.cpp:3:186: error: expected declaration before '}' token
 k++; for(i=1;i<=n;i++) { for(j=1;j<n+i;j++) { if(i<=n-1) { if((i+j)==n+1) printf("%c",c); else if(j==(n+i-1)) printf("%c",c); else printf(" "); } else printf("%c",c); } printf("\n"); } } return 0; }
                                                                                                                                                                                          ^


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-12-02 20:01:43, Gzip enabled