Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
30
Task/Pangram-checker/Batch-File/pangram-checker.bat
Normal file
30
Task/Pangram-checker/Batch-File/pangram-checker.bat
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
%===The Main Thing===%
|
||||
call :pangram "The quick brown fox jumps over the lazy dog."
|
||||
call :pangram "The quick brown fox jumped over the lazy dog."
|
||||
echo.
|
||||
pause
|
||||
exit /b 0
|
||||
|
||||
%===The Function===%
|
||||
:pangram
|
||||
set letters=abcdefgihjklmnopqrstuvwxyz
|
||||
set cnt=0
|
||||
set inp=%~1
|
||||
set str=!inp: =!
|
||||
|
||||
:loop
|
||||
set chr=!str:~%cnt%,1!
|
||||
if "!letters!"=="" (
|
||||
echo %1 is a pangram^^!
|
||||
goto :EOF
|
||||
)
|
||||
if "!chr!"=="" (
|
||||
echo %1 is not a pangram.
|
||||
goto :EOF
|
||||
)
|
||||
set letters=!letters:%chr%=!
|
||||
set /a cnt+=1
|
||||
goto loop
|
||||
Loading…
Add table
Add a link
Reference in a new issue