xref: /openbsd-src/games/arithmetic/arithmetic.6 (revision eef66833139d7be747b568761ae68ed99ac8d439)
1*eef66833Sschwarze.\"	$OpenBSD: arithmetic.6,v 1.12 2015/09/12 16:10:25 schwarze Exp $
2df930be7Sderaadt.\"
3df930be7Sderaadt.\" Copyright (c) 1989, 1993
4df930be7Sderaadt.\"	The Regents of the University of California.  All rights reserved.
5df930be7Sderaadt.\"
6df930be7Sderaadt.\" This code is derived from software contributed to Berkeley by
7df930be7Sderaadt.\" Eamonn McManus of Trinity College Dublin.
8df930be7Sderaadt.\"
9df930be7Sderaadt.\" Redistribution and use in source and binary forms, with or without
10df930be7Sderaadt.\" modification, are permitted provided that the following conditions
11df930be7Sderaadt.\" are met:
12df930be7Sderaadt.\" 1. Redistributions of source code must retain the above copyright
13df930be7Sderaadt.\"    notice, this list of conditions and the following disclaimer.
14df930be7Sderaadt.\" 2. Redistributions in binary form must reproduce the above copyright
15df930be7Sderaadt.\"    notice, this list of conditions and the following disclaimer in the
16df930be7Sderaadt.\"    documentation and/or other materials provided with the distribution.
177a09557bSmillert.\" 3. Neither the name of the University nor the names of its contributors
18df930be7Sderaadt.\"    may be used to endorse or promote products derived from this software
19df930be7Sderaadt.\"    without specific prior written permission.
20df930be7Sderaadt.\"
21df930be7Sderaadt.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22df930be7Sderaadt.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23df930be7Sderaadt.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24df930be7Sderaadt.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25df930be7Sderaadt.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26df930be7Sderaadt.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27df930be7Sderaadt.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28df930be7Sderaadt.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29df930be7Sderaadt.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30df930be7Sderaadt.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31df930be7Sderaadt.\" SUCH DAMAGE.
32df930be7Sderaadt.\"
33df930be7Sderaadt.\"	@(#)arithmetic.6	8.1 (Berkeley) 5/31/93
34df930be7Sderaadt.\"
35*eef66833Sschwarze.Dd $Mdocdate: September 12 2015 $
36df930be7Sderaadt.Dt ARITHMETIC 6
37fc8533a3Saaron.Os
38df930be7Sderaadt.Sh NAME
39df930be7Sderaadt.Nm arithmetic
40df930be7Sderaadt.Nd quiz on simple arithmetic
41df930be7Sderaadt.Sh SYNOPSIS
42a702fa09Spjanzen.Nm arithmetic
43*eef66833Sschwarze.Op Fl o Cm +\-x/
44df930be7Sderaadt.Op Fl r Ar range
45df930be7Sderaadt.Sh DESCRIPTION
463897dfeeSpjanzen.Nm
47df930be7Sderaadtasks you to solve problems in simple arithmetic.
48df930be7SderaadtEach question must be answered correctly before going on to the next.
49df930be7SderaadtAfter every 20 problems, it prints the score so far and the time taken.
50df930be7SderaadtYou can quit at any time by typing the interrupt or end-of-file character.
51df930be7Sderaadt.Pp
52df930be7SderaadtThe options are as follows:
53df930be7Sderaadt.Bl -tag -width indent
54*eef66833Sschwarze.It Fl o Cm +\-x/
55df930be7SderaadtBy default,
563897dfeeSpjanzen.Nm
57df930be7Sderaadtasks questions on addition of numbers from 0 to 10, and corresponding
58df930be7Sderaadtsubtraction.
59df930be7SderaadtBy supplying one or more of the characters
60*eef66833Sschwarze.Cm +\-x/ ,
61df930be7Sderaadtyou can ask for problems in addition, subtraction, multiplication, and
62df930be7Sderaadtdivision, respectively.
63df930be7SderaadtIf you give one of these characters more than once, that kind of problem
64df930be7Sderaadtwill be asked correspondingly more often.
6536c03101Sjmc.It Fl r Ar range
66df930be7SderaadtIf a
67df930be7Sderaadt.Ar range
68df930be7Sderaadtis supplied,
691ed0e75dSpjanzen.Nm
70df930be7Sderaadtselects the numbers in its problems in the following way.
71df930be7SderaadtFor addition and multiplication, the numbers to be added or multiplied
72df930be7Sderaadtare between 0 and
73df930be7Sderaadt.Ar range ,
74df930be7Sderaadtinclusive.
75df930be7SderaadtFor subtraction and division, both the required result and the number to
76df930be7Sderaadtdivide by or subtract will be between 0 and
77df930be7Sderaadt.Ar range .
78df930be7Sderaadt(Of course,
791ed0e75dSpjanzen.Nm
8015facedeSjmcwill not ask you to divide by 0.)
8115facedeSjmcThe default
8269563570Sjmc.Ar range
83df930be7Sderaadtis 10.
84df930be7Sderaadt.El
85df930be7Sderaadt.Pp
86df930be7SderaadtWhen you get a problem wrong,
871ed0e75dSpjanzen.Nm
88df930be7Sderaadtwill remember the numbers involved, and will tend to select those numbers
89df930be7Sderaadtmore often than others, in problems of the same sort.
90df930be7SderaadtEventually it will forgive and forget.
91df930be7Sderaadt.Pp
923897dfeeSpjanzen.Nm
93df930be7Sderaadtcannot be persuaded to tell you the right answer.
94df930be7SderaadtYou must work it out for yourself.
95df930be7Sderaadt.Sh DIAGNOSTICS
96df930be7Sderaadt.Dq What?
97df930be7Sderaadtif you get a question wrong.
98df930be7Sderaadt.Dq Right!
99df930be7Sderaadtif you get it right.
100df930be7Sderaadt.Dq Please type a number.
10115facedeSjmcif
10215facedeSjmc.Nm
10315facedeSjmcdoesn't understand what you typed.
104df930be7Sderaadt.Sh SEE ALSO
105df930be7Sderaadt.Xr bc 1 ,
106df930be7Sderaadt.Xr dc 1
107