今天用vc++6.0写了段代码,总是提示错误 error C2143: syntax error : missing ')' before '{'检查了好几遍

代码如下:还望高手帮忙找出错误,谢谢!!
#include "stdio.h"
#include "ctype.h"
main(){
char a[100];int i=0;
printf("please input the sentence:");
scanf("%s",a);
while(a[i]!='\0'){
if(isalpha(a[i]) {
if('a'<=tolower(a[i])&&tolower(a[i])<'x') a[i]=a[i]+3;
else a[i]=a[i]-29;}
}
printf("%s",a);
}

楼上正解
多报错了
syntax error : missing ')' before '{'
语法错误:在{前缺少)
温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-07-02
#include "stdio.h"
#include "ctype.h"
main(){
char a[100];int i=0;
printf("please input the sentence:");
scanf("%s",a);
while(a[i]!='\0'){
if(isalpha(a[i])) {
if('a'<=tolower(a[i])&&tolower(a[i])<'x') a[i]=a[i]+3;
else a[i]=a[i]-29;}
}
printf("%s",a);
}//你在第八行丢掉了“)”
第2个回答  2012-06-24
if(isalpha(a[i]) ){
这里差个括号啊
相似回答