tags: 實習題目 大一程設 東華大學 東華大學資管系 基本程式概念 資管經驗分享

英文字母大小寫轉換

有一個變數,該變數的data type為char,值為使用者自行輸入一大寫或小寫字母。

  • 請寫一個if-else判斷式來判斷該字母是大寫還小寫
  • 若是大寫字母則把它轉換成小寫字母並輸出
  • 若是小寫字母則轉換成大寫字母並輸出。

提示:利用ascii

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

範例輸入

A

範例輸出

a

溫馨小提醒:
你以為只有程式要好好學嗎? 計概也要好好學喔!
Orange