![]() ![]() ![]() off cls title Welcome color f0 goto skip color 36 :skip echo Hello! echo This is a chess application. set /p answer= variable=5 if %answer% neq A goto incorrectL1 echo. echo A) 16 hours echo B) 5 minutes echo C) 13 hours echo D) 18 hours echo. How long does a domestic cat's memory last? echo. set /p answer= variable=4 if %answer% neq C goto incorrectL1 echo. echo A) 3x its height echo B) 5x its height echo C) 7x its height echo D) 10x its height echo. How high can an average domestic cat jump? echo. set /p answer= variable=3 if %answer% neq A goto incorrectL1 echo. When was the first Dodge Viper concept shown in a car show? echo. set /p answer= variable=2 if %answer% neq C goto incorrectL1 echo. ![]() echo A) 12 Feet echo B) 12 Millimeters echo C) 12 Inches echo D) 12 Miles echo. set /p answer= if %answer% neq B goto incorrectL1 echo. echo A) Snail echo B) Light echo C) Thrust SSC echo D) An airplane echo. What is the fastest object in the world? echo. pause cls goto L1 :incorrectL1 cls echo You got the wrong answer! pause cls echo What question # did you get wrong? set /p variable= if %variable% equ 1 goto 1 if %variable% equ 2 goto 2 if %variable% equ 3 goto 3 if %variable% equ 4 goto 4 if %variable% equ 5 goto 5 :L1 :1 echo Level 1 echo. If you answer a question wrong, you will go back to the beginning of that level. You will go up a level once you answer 5 questions. Do your best! Each level will have 5 questions. pause cls echo You will answer a series of random multiple-choice questions. off title Trivia Game color 7 pause echo Welcome to David's Game of Trivia! echo. Note: When you finish question 5, the program will close. To run it, copy and paste it into Notepad, click on File, then save as, then click on all files in the drop down menu, and save the program with the name you want followed by. Here is some source code for my Trivia game. You can make up a story and ask the reader/user what he/she's decision is. Another interesting program that can be made with Batch is a Pick-your-own-adventure book like interaction. It asks you random questions and determines if your answer is correct or incorrect. A cool thing I'm making with it is a trivia game. Batch programming is a really cool language and easy to learn, but somewhat limited. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |