亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

將字符串小寫轉(zhuǎn)大寫并延時(shí)輸出的批處理代碼

 更新時(shí)間:2010年10月11日 13:28:06   作者:  
有一字符串i like the bathome,because here is the batch of the world. 要求用批處理將字符串的所有字母轉(zhuǎn)成大寫并在屏幕上以打字的效果延時(shí)輸出。
出題目的
1 掌握大、小寫互換的技巧
2 掌握延時(shí)輸出技巧
3 掌握字符截取技巧
解題要求
1 確保代碼高效、通用
2 盡量簡(jiǎn)潔代碼
3 不生成臨時(shí)文件
加分規(guī)則
1 思路獨(dú)特基準(zhǔn)分5分
2 代碼高效、通用基準(zhǔn)分4分
3 技巧高超基準(zhǔn)分3分
4 代碼簡(jiǎn)潔基準(zhǔn)分2分
5 完美代碼加分15分
題目如下
有一字符串i like the bathome,because here is the batch of the world.
要求用批處理將字符串的所有字母轉(zhuǎn)成大寫并在屏幕上以打字的效果延時(shí)輸出。
解題限制
暫無(wú)限制

batman:
復(fù)制代碼 代碼如下:

@echo off
set "str=i like the bathome,because here is the batch of the world."
set "code=A B C D E F G H I J K L N M O P Q R S T U V W X Y Z"
for %%i in (%code%) do call,set "str=%%str:%%i=%%i%%"
:lp
set /p=%str:~,1%<nul&set "str=%str:~1%"
for /l %%i in (1,1,200) do echo>nul
if defined str goto lp
pause>nul

 

terse:
復(fù)制代碼 代碼如下:

@echo off&setlocal EnableDelayedExpansion
set "str=i like the bathome,because here is the batch of the world."
for %%i in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do set str=!str:%%i=%%i!
:lp
set/p=!str:~%n%,1!<nul
set/a n+=1
for /l %%j in (1,1,500) do ver>nul
if not "!str:~%n%,1!"=="" goto lp
pause>nul

相關(guān)文章

最新評(píng)論