第六章例6-1

#include<stdio.h>
int main(void)
{
    int i;
    char ch_lower,ch_upper;
    for(i=1;i<=6;i++)
    {
        scanf_s("%c",&ch_lower);
        if(ch_lower>='a'&&ch_lower<='z')
            ch_upper=ch_lower-'a'+'A';
        printf("%c->%c->%d
",ch_lower,ch_upper,ch_upper%10);
    }
    return 0;
}

原文地址:https://www.cnblogs.com/laurenliu1994/p/3354607.html