使用toupper()和tolower()函数分别将字符转换为大写和小写

#include <stdio.h>
#include <ctype.h>

int main(void)
{
    char letter = 0;                          // Stores a character
    printf(Enter an uppercase letter:);     // Prompt for input
    scanf(%c, &letter);                     // Read a character

    if(isalpha(letter) && isupper(letter))
       printf(You entered an uppercase %c.\n, tolower(letter));
    else
       printf(You did not enter an uppercase letter.\n);

    return 0;
}

相关文章

for遍历数组
。。。
声明一个计数循环
咕咕咕
#include <stdio.h> int main (void) { printf (&quo...