Skip to content

Instantly share code, notes, and snippets.

@CoolUnicorn
Created September 10, 2014 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save CoolUnicorn/a19fe45e5fee16522c2e to your computer and use it in GitHub Desktop.
Save CoolUnicorn/a19fe45e5fee16522c2e to your computer and use it in GitHub Desktop.
This is a catalog of teachers. There are nine departments at my school. Each department has been assigned a number in this program, for which I wrote the complete script. Once the teacher selects which department, the screen is cleared and a list of teachers for that department appears. Each teacher has an assigned number, which, when pressed, t…
@echo off
cls
:start
echo.
echo 1 Fine Arts
echo 2 Classics
echo 3 Computer Science
echo 4 English
echo 5 Mathematics
echo 6 Modern World Languages and Culture
echo 7 Physical Education and Health
echo 8 Science
echo 9 Social Studies
set /p choice=What department?
if '%choice%'=='1' goto choice 1
if '%choice%'=='2' goto choice 2
if '%choice%'=='3' goto choice 3
if '%choice%'=='4' goto choice 4
if '%choice%'=='5' goto choice 5
if '%choice%'=='6' goto choice 6
if '%choice%'=='7' goto choice 7
if '%choice%'=='8' goto choice 8
if '%choice%'=='9' goto choice 9
echo "%choice%" is not a valid option. Please try again.
echo.
pause
cls
goto start
:choice 1
choice /m "Is that correct"
if errorlevel 2 goto no
if errorlevel 1 goto yes
goto end
:no
echo You selected no.
pause
goto start
:yes
echo Great.
pause
goto fine arts
goto end
:choice 2
choice /m "Is that correct"
if errorlevel 2 goto no1
if errorlevel 1 goto yes1
:no1
echo You selected no.
pause
goto start
:yes1
echo Great.
pause
goto classics
goto ...end
:choice 3
choice /m "Is that correct"
if errorlevel 2 goto no2
if errorlevel 1 goto yes2
:no2
echo You selected no.
pause
goto start
:yes2
echo Great.
pause
goto computer science
goto end
:choice 4
choice /m "Is that correct"
if errorlevel 2 goto no3
if errorlevel 1 goto yes3
:no3
echo You selected no.
pause
goto start
:yes3
echo Great.
pause
goto english
goto end
:choice 5
choice /m "Is that correct"
if errorlevel 2 goto no4
if errorlevel 1 goto yes4
:no4
echo You selected no.
pause
goto start
:yes4
echo Great.
pause
goto mathematics
goto end
:choice 6
choice /m "Is that correct"
if errorlevel 2 goto no5
if errorlevel 1 goto yes5
:no5
echo You selected no.
pause
goto start
:yes5
echo Great.
pause
goto modern world languages and culture
goto end
:choice 7
choice /m "Is that correct"
if errorlevel 2 goto no6
if errorlevel 1 goto yes6
:no6
echo You selected no.
pause
goto start
:yes6
echo Great.
pause
goto physical education and health
goto end
:choice 8
choice /m "Is that correct"
if errorlevel 2 goto no7
if errorlevel 1 goto yes7
:no7
echo You selected no.
pause
goto start
:yes7
echo Great.
pause
goto science
goto end
:choice 9
choice /m"Is that correct"
if errorlevel 2 goto no8
if errorlevel 1 goto yes8
:no8
echo You selected no.
pause
goto start
:yes8
echo Great.
pause
goto social studies
goto end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment