從鍵盤輸入一個大寫英文字母,將其轉換為小寫英文字母后,將轉換后的小寫英文字母及其十進制的ASCII碼值顯示到屏幕上。
**輸入格式要求:提示信息:"Press a key and then press Enter:"
**輸出格式要求:"%c, %d\n"
程序運行示例如下:
Press a key and then press Enter:B
b, 98
1 #include<stdio.h> 2 int main() 3 { 4 char a; 5 printf("Press a key and then press Enter:"); 6 scanf("%c",&a); 7 printf("%c,%d\n",a+32,a+32); 8 return 0; 9 }