FREAD -> O_RDONLY
[unix-history] / usr / src / games / arithmetic / arithmetic.6
CommitLineData
afa1807c
KB
1.\" Copyright (c) 1989 The Regents of the University of California.
2.\" All rights reserved.
fb330e38 3.\"
afa1807c
KB
4.\" This code is derived from software contributed to Berkeley by
5.\" Eamonn McManus of Trinity College Dublin.
6.\"
7.\" Redistribution and use in source and binary forms are permitted
8.\" provided that the above copyright notice and this paragraph are
9.\" duplicated in all such forms and that any documentation,
10.\" advertising materials, and other materials related to such
11.\" distribution and use acknowledge that the software was developed
12.\" by the University of California, Berkeley. The name of the
13.\" University may not be used to endorse or promote products derived
14.\" from this software without specific prior written permission.
15.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18.\"
afb3876d 19.\" @(#)arithmetic.6 6.5 (Berkeley) %G%
afa1807c 20.\"
afb3876d 21.TH ARITHMETIC 6 ""
afa1807c 22.UC 4
fb330e38 23.SH NAME
afa1807c 24arithmetic \- quiz on simple arithmetic
fb330e38 25.SH SYNOPSIS
afa1807c
KB
26.B arithmetic
27.B [
07bd5315 28\-o +\-x/
afa1807c
KB
29.B ]
30.B [
07bd5315 31\-r range
afa1807c 32.B ]
fb330e38
KM
33.SH DESCRIPTION
34.I Arithmetic
afa1807c
KB
35asks you to solve problems in simple arithmetic.
36Each question must be answered correctly before going on to the next.
37After every 20 problems, it prints the score so far and the time taken.
38You can quit at any time by typing the interrupt or end-of-file character.
fb330e38 39.PP
afa1807c
KB
40The options are as follows:
41.TP
42\-o
43By default,
44.I arithmetic
45asks questions on addition of numbers from 0 to 10, and corresponding
46subtraction.
47By supplying one or more of the characters
48.BR +\-x/ ,
49you can ask for problems in addition, subtraction, multiplication, and
50division, respectively.
51If you give one of these characters more than once, that kind of problem
52will be asked correspondingly more often.
53.TP
54\-r
55If a
56.I range
57is supplied,
58.I arithmetic
59selects the numbers in its problems in the following way.
60For addition and multiplication, the numbers to be added or multiplied
61are between 0 and
62.IR range ,
63inclusive.
64For subtraction and division, both the required result and the number to
65divide by or subtract will be between 0 and
fb330e38 66.IR range .
afa1807c
KB
67(Of course,
68.I arithmetic
69will not ask you to divide by 0.) The default
fb330e38
KM
70.I range
71is 10.
72.PP
afa1807c
KB
73When you get a problem wrong,
74.I arithmetic
75will remember the numbers involved, and will tend to select those numbers
76more often than others, in problems of the same sort.
77Eventually it will forgive and forget.
fb330e38 78.PP
afa1807c
KB
79.I Arithmetic
80cannot be persuaded to tell you the right answer.
81You must work it out for yourself.
82.SH DIAGNOSTICS
83``What?'' if you get a question wrong.
84``Right!'' if you get it right.
85``Please type a number.'' if arithmetic doesn't understand what you typed.
86.SH "SEE ALSO"
87bc(1), dc(1)