第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Java的凱撒密碼解密程序,出現(xiàn)邏輯錯誤。

Java的凱撒密碼解密程序,出現(xiàn)邏輯錯誤。

化糖 2016-07-28 14:23:55
以下代碼似乎會讓IDE將回車看做字符,怎么回事? package?caesarCipher; import?java.util.Scanner; public?class?unlock?{ public?static?void?main(String[]args){ Scanner?in=new?Scanner(System.in); System.out.println("Please?type?words,there?should?be?less?than?2001.");//警告1 System.out.println("Please?check?contents,make?sure?there?is?no?character?which?goes?beyond?40-126(ASCII).The?programme?only?supports?English.");//警告2 String?words=in.nextLine(); words.replace('\r','?'); char[]?wordsList=new?char[2000]; for(int?i=0;i<words.length();i++) wordsList[i]=words.charAt(i); unlock(wordsList);//解密 for(int?i=0;i<words.length();i++) System.out.print(wordsList[i]); System.out.println(); } public?static?void?unlock(char[]?words){ for(int?i=0;i<words.length;i++){ if(words[i]>=33){ words[i]=(char)(words[i]+219); } else?if(i>=37&&i<=255){ words[i]=(char)(words[i]-4); } else{ System.out.println("\nFind?a?character?goes?beyond?33-255?of?ASCII!!!Index:"+i); System.exit(1); } } } }
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 1660 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號