#17831: 自己執行程式時有符合題目,但繳交時卻不給過


testTC (testTC)


#include <stdio.h>
int main()
{
int s[9999] ;
scanf("%s", &s);
printf("hello, %s\n", s);
return 0 ;
}

#17835: Re:自己執行程式時有符合題目,但繳交時卻不給過


aaron1005.huang@gmail.com (Aaron Huang)


#include
int main()
{
int s[9999] ;
scanf("%s", &s);
printf("hello, %s\n", s);
return 0 ;
}

 

line 5: scanf( "%s",s );

 

this program can only executed once, try this loop:

while(scanf("%s",s)!=EOF){

//put your program here

}



this loop will wait until the user input a string,then the code will repeat again and again

 

*i'm sorry that i can't reply you by using chinese,the linus don't let me change language  :(