c语言帮我看看哪里错了,小写化大写不行 结果是问号

#include <stdio.h>

int main()

{

char tmp;

scanf("%c",&tmp);

if(tmp>=65&&tmp<=90);

{

tmp=tmp+32;

printf("%c\n",tmp);

return 0;

}

if(tmp>=97&&tmp<=122);

{

tmp=tmp-32;

printf("%c\n",tmp);

return 0;

}

}

已经改正了,运行通过:
#include <stdio.h>
int main()
{
char tmp;
scanf("%c",&tmp);
if(tmp>=65&&tmp<=90)
{
tmp=tmp+32;
printf("%c\n",tmp);
return 0;
}
if(tmp>=97&&tmp<=122)
{
tmp=tmp-32;
printf("%c\n",tmp);
return 0;
}
}
温馨提示:答案为网友推荐,仅供参考
第1个回答  2016-06-12
少年 你为何要在if后面加分号?
相似回答