Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- mode 60,10
- color 0f
- echo.
- echo.
- :: vamos cantando!! "100 garrafas de cerveja no muro, 100 garrafas!
- :: Se uam garrafa cair no chão, quantas ficarão?
- :: 99 garrafas no muro, 99 garrafas! se uma garrafa cair no chão, quantas ficarão?..."
- if "%1"=="" goto Out_ro
- if "%1"=="Todo_mundo" goto Todo_mundo
- :inner
- for %%a in ( 9 8 7 6 5 4 3 2 1 0 ) do call %~nx0 Todo_mundo %2 %%a
- goto end
- :Out_ro
- for %%a in ( 9 8 7 6 5 4 3 2 1 0 ) do call %~nx0 inner %%a
- goto end
- :Todo_mundo
- set num=%2%3
- set Gara_fa=garrafas
- if "%num%"=="99" set Nume_ro=noventa e nove
- if "%num%"=="19" set Nume_ro=dezenove
- if "%num%"=="09" set Nume_ro=nove
- if "%num%"=="99" call :maquina "Tinhamos cem garrafas de cerveja encima do muro" &call :maquina "Caiu uma no chão" &goto pula_prim
- if "%2"=="0" set num=%3
- if "%num%"=="1" set Gara_fa=garrafa
- if "%num%"=="0" goto ult_tima
- call :maquina "%Nume_ro% %Gara_fa% de cerveja encima do muro"
- echo.
- :pula_prim
- :: call :maquina "%Nume_ro% %Gara_fa%"
- echo.
- call :maquina "Nós temos %Nume_ro% %Gara_fa% de cerveja encima do muro"
- if not "%num%"=="1" call :maquina "Vixi.... caiu mais uma garrafa"&call :maquina "Quantas sobraram ?"
- echo.
- if "%num%"=="1" call :maquina "Se alguem derrubá-la quantas ficam ?"
- :ult_tima
- if "%num%"=="0" call :maquina "não tem mais garrafas de cerveja no muro"
- if "%num%"=="0" del /Q /s "ef.vbs" >nul&goto end
- if "%2"=="9" set Nume_roi=noventa
- if "%2"=="8" set Nume_roi=oitenta
- if "%2"=="7" set Nume_roi=setenta
- if "%2"=="6" set Nume_roi=secenta
- if "%2"=="5" set Nume_roi=cinquenta
- if "%2"=="4" set Nume_roi=quarenta
- if "%2"=="3" set Nume_roi=trinta
- if "%2"=="2" set Nume_roi=vinte
- if "%2"=="1" set Nume_roi=
- if "%2"=="0" set Nume_roi=
- if not "%2"=="1" goto seg_casa
- if "%3%"=="9" set Nume_roi=dezoito
- if "%3%"=="8" set Nume_roi=dezesete
- if "%3%"=="7" set Nume_roi=dezeseis
- if "%3%"=="6" set Nume_roi=quinze
- if "%3%"=="5" set Nume_roi=quatorze
- if "%3%"=="4" set Nume_roi=treze
- if "%3%"=="3" set Nume_roi=doze
- if "%3%"=="2" set Nume_roi=onze
- if "%3%"=="1" set Nume_roi=dez
- set Nu_me=
- goto Mostra_num
- :seg_casa
- if "%3"=="0" set Nu_me=nove
- if "%3"=="9" set Nu_me=oito
- if "%3"=="8" set Nu_me=sete
- if "%3"=="7" set Nu_me=seis
- if "%3"=="6" set Nu_me=cinco
- if "%3"=="5" set Nu_me=quatro
- if "%3"=="4" set Nu_me=trez
- if "%3"=="3" set Nu_me=duas
- if "%3"=="2" goto Ultima_casa
- if "%3"=="1" set Nu_me=
- if not "%3"=="0" goto Mostra_num
- if "%2"=="9" set Nume_roi=oitenta
- if "%2"=="8" set Nume_roi=setenta
- if "%2"=="7" set Nume_roi=secenta
- if "%2"=="6" set Nume_roi=cinquenta
- if "%2"=="5" set Nume_roi=quarenta
- if "%2"=="4" set Nume_roi=trinta
- if "%2"=="3" set Nume_roi=vinte
- if "%2"=="2" set Nume_roi=
- if "%2"=="1" set Nume_roi=
- goto Mostra_num
- :Ultima_casa
- if not "%2"=="0" set Nu_me=uma
- if "%2"=="0" set Nu_me=mais uma
- :Mostra_num
- if "%2"=="0" goto Pula_Intro
- if "%2"=="1" goto Pula_Intro
- if "%3"=="0" set Nume_roi=%Nume_roi% e
- if "%3"=="9" set Nume_roi=%Nume_roi% e
- if "%3"=="8" set Nume_roi=%Nume_roi% e
- if "%3"=="7" set Nume_roi=%Nume_roi% e
- if "%3"=="6" set Nume_roi=%Nume_roi% e
- if "%3"=="5" set Nume_roi=%Nume_roi% e
- if "%3"=="4" set Nume_roi=%Nume_roi% e
- if "%3"=="3" set Nume_roi=%Nume_roi% e
- if "%3"=="2" set Nume_roi=%Nume_roi% e
- :Pula_Intro
- set Nume_ro=%Nume_roi%%Nu_me%
- cls
- :end
- ping -n 1 localhost >nul
- goto:eof
- :maquina
- set txt=%~1
- (
- echo On Error Resume Next
- echo dim txt
- echo txt="%txt%"
- echo for i=1 to len(txt^)
- echo wscript.sleep 10
- echo wscript.StdOut.Write mid(txt,i,1^)
- echo next
- echo wscript.echo " "
- )>ef.vbs
- cscript /nologo "ef.vbs"
- goto:eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement