Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
hammadsayyed
basic-computer-games
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
basic-computer-games
/
61_Math_Dice
/
mathdice.bas
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
60 lines (60 loc) · 1.28 KB
main
Breadcrumbs
basic-computer-games
/
61_Math_Dice
/
mathdice.bas
Copy path
Top
File metadata and controls
Code
Blame
60 lines (60 loc) · 1.28 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
10
PRINT
TAB
(
31
);
"MATH DICE"
20
PRINT
TAB
(
15
);
"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
30
PRINT
:
PRINT
:
PRINT
40
PRINT
"THIS PROGRAM GENERATES SUCCESSIVE PICTURES OF TWO DICE."
50
PRINT
"WHEN TWO DICE AND AN EQUAL SIGN FOLLOWED BY A QUESTION"
60
PRINT
"MARK HAVE BEEN PRINTED, TYPE YOUR ANSWER AND THE RETURN KEY."
70
PRINT
"TO CONCLUDE THE LESSON, TYPE CONTROL-C AS YOUR ANSWER."
80
PRINT
90
PRINT
100
N
=
N
+
1
110
D
=
INT
(
6
*
RND
(
1
)
+
1
)
120
PRINT
" ----- "
130
IF
D
=
1
THEN
200
140
IF
D
=
2
THEN
180
150
IF
D
=
3
THEN
180
160
PRINT
"I * * I"
170
GOTO
210
180
PRINT
"I * I"
190
GOTO
210
200
PRINT
"I I"
210
IF
D
=
2
THEN
260
220
IF
D
=
4
THEN
260
230
IF
D
=
6
THEN
270
240
PRINT
"I * I"
250
GOTO
280
260
PRINT
"I I"
265
GOTO
280
270
PRINT
"I * * I"
280
IF
D
=
1
THEN
350
290
IF
D
=
2
THEN
330
300
IF
D
=
3
THEN
330
310
PRINT
"I * * I"
320
GOTO
360
330
PRINT
"I * I"
340
GOTO
360
350
PRINT
"I I"
360
PRINT
" ----- "
370
PRINT
375
IF
N
=
2
THEN
500
380
PRINT
" +"
381
PRINT
400
A
=
D
410
GOTO
100
500
T
=
D
+
A
510
PRINT
" ="
;
520
INPUT
T1
530
IF
T1
=
T
THEN
590
540
PRINT
"NO, COUNT THE SPOTS AND GIVE ANOTHER ANSWER."
541
PRINT
" ="
;
550
INPUT
T2
560
IF
T2
=
T
THEN
590
570
PRINT
"NO, THE ANSWER IS"
;T
580
GOTO
600
590
PRINT
"RIGHT!"
600
PRINT
601
PRINT
"THE DICE ROLL AGAIN..."
610
PRINT
615
N
=
0
620
GOTO
100
999
END
You can’t perform that action at this time.