Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:为什么一直Compile Error啊?哪位大神帮小弟看看?感激不尽啊 都compile error十多次啦In Reply To:为什么一直Compile Error啊?哪位大神帮小弟看看?感激不尽啊 都compile error十多次啦 Posted by:scut_hcy at 2013-01-30 21:25:25 > } #include<iostream> #include<cstring> using namespace std; int main() { int or[15][15]; int tr[15][15]; char s[20]; int m,n; while(cin>>s&&strcmp(s,"ENDOFINPUT")) { cin>>m>>n; int j,k; char c; for(j=1;j<=m;j++) for(k=1;k<=n;k++) { cin>>c; or[j][k]=c-'0'; } cin>>s; for(j=1;j<=m-1;j++) for(k=1;k<=n-1;k++) { tr[j][k]=(or[j][k]+or[j][k+1]+or[j+1][k]+or[j+1][k+1])/4; } for(j=1;j<=m-1;j++) { for(k=1;k<=n-1;k++) cout<<tr[j][k]; cout<<endl; } } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator