C language inputs a character, determines whether it is an uppercase letter, if so, converts it to a lowercase letter, if not, does not convert it, and then outputs it

#include<stdio.h>
int main()
{
	char ch;
	scanf("%c",&ch);
	ch=(ch>='A'&&ch<='Z')?(ch+32):ch;;
	printf("%c\n",ch);
	return 0;
}

Guess you like

Origin blog.csdn.net/qq_63554603/article/details/127244176