Guest User

Untitled

a guest
Jul 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. public class Q1 {
  2. /* 請撰寫一個程式, 將標準萬國碼中字碼為 97 到 99 之間的字元顯示在螢幕上。 */
  3.  
  4. public static void main(String[] args) {
  5. int unicode = 97;
  6. for(char unicodeOutput = 97 ; unicodeOutput <= 99 ; unicodeOutput++) { //用for迴圈將char 97~99的值丟給unicodeOutput
  7. System.out.println("萬國碼 " + unicode + " = " + unicodeOutput); //印出unicodeOutput值
  8. unicode++;
  9. }
  10.  
  11. }
  12.  
  13. }
Add Comment
Please, Sign In to add comment