C语言编程题求解,在线等!!!

如图
2024-11-27 20:58:37
推荐回答(1个)
回答1:

C语言程序:

#include 梁岁


void main()

{

    char ch = 'G';

    int value = 'G';


 橡冲睁   printf("input a character : ");

    ch = getchar();

    value = ch;

    getchar();



    if(ch >= 'a' && ch <= 'z')

      判腊  ch -= 32;


    printf("%c %d\n", ch, value);


    printf("input a character : ");

    scanf("%c", &ch);

    value = ch;


    if(ch >= 'a' && ch <= 'z')

        ch -= 32;


    printf("%c %d\n", ch, value);

}



运行测试: