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 |
为什么一直Compile Error啊?哪位大神帮小弟看看?感激不尽啊 都compile error十多次啦#include<iostream> #include<cstring> using namespace std; int main() { int i,j,r,c,ans[10][10]; char a[20],map[10][10]; while(1) { cin>>a>>r>>c; if(strcmp(a,"ENDOFINPUT")==0) { break; } for(i=0;i<r;i++) { cin>>map[i]; } cin>>a; for(i=0;i<r-1;i++) { for(j=0;j<c-1;j++) { ans[i][j]=(map[i][j]-'0'+map[i+1][j]-'0'+map[i+1][j+1]-'0'+map[i][j+1]-'0')/4; cout<<ans[i][j]; } 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