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 |
为什么RUN TIME ERROR?#include<iostream.h> #include<string.h> char a[250]; char b[250]; char*start="START"; char*end="END"; char*over="ENDOFINPUT"; void main() { int i,j; while(1) { i=0; while((a[i]=cin.get())!='\n')i++; a[i]='\0'; if(!strcmp(a,over))break; if(strcmp(a,start)&&strcmp(a,end)) { for(j=0;j<i;j++) { if(a[j]>='A'&&a[j]<='Z') { a[j]-=5; if(a[j]<'A')a[j]+=26; } b[j]=a[j]; } b[j]='\0'; } if(!strcmp(a,end))cout<<b<<endl; } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator