如何用C语言写这个程序:用键盘输入大写的字母输出小写字母.输入其他要作出提示

我的程序是这样的.各位高手能指出我的错误吗?#include"stdio.h"main(){char letter1,letter2;scanf("%c",&letter1);(letter1>='a'&&letter1<='z'||letter1>='A'&&letter1<='Z')?printf("%c",letter2):printf("It is not a letter");letter2=(letter1>='a'&&letter1<='z')?letter2=letter1:letter2=letter1-32; }
最新回答
干净好听的昵称

2024-09-14 08:55:53

#include"stdio.h"
int main()
{
char letter1,letter2;
scanf("%c",&letter1);
if(letter1>='A'&&letter1<='Z')
{
printf("%c\n",((int)letter1+32));
}
else
printf("It is not a letter\n");
}
喻夜白

2024-09-14 06:59:25

TTTT