1*86d7f5d3SJohn Marino.\" Copyright (c) 1989, 1993 2*86d7f5d3SJohn Marino.\" The Regents of the University of California. All rights reserved. 3*86d7f5d3SJohn Marino.\" 4*86d7f5d3SJohn Marino.\" This code is derived from software contributed to Berkeley by 5*86d7f5d3SJohn Marino.\" Eamonn McManus of Trinity College Dublin. 6*86d7f5d3SJohn Marino.\" 7*86d7f5d3SJohn Marino.\" Redistribution and use in source and binary forms, with or without 8*86d7f5d3SJohn Marino.\" modification, are permitted provided that the following conditions 9*86d7f5d3SJohn Marino.\" are met: 10*86d7f5d3SJohn Marino.\" 1. Redistributions of source code must retain the above copyright 11*86d7f5d3SJohn Marino.\" notice, this list of conditions and the following disclaimer. 12*86d7f5d3SJohn Marino.\" 2. Redistributions in binary form must reproduce the above copyright 13*86d7f5d3SJohn Marino.\" notice, this list of conditions and the following disclaimer in the 14*86d7f5d3SJohn Marino.\" documentation and/or other materials provided with the distribution. 15*86d7f5d3SJohn Marino.\" 3. Neither the name of the University nor the names of its contributors 16*86d7f5d3SJohn Marino.\" may be used to endorse or promote products derived from this software 17*86d7f5d3SJohn Marino.\" without specific prior written permission. 18*86d7f5d3SJohn Marino.\" 19*86d7f5d3SJohn Marino.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20*86d7f5d3SJohn Marino.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21*86d7f5d3SJohn Marino.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22*86d7f5d3SJohn Marino.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23*86d7f5d3SJohn Marino.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24*86d7f5d3SJohn Marino.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25*86d7f5d3SJohn Marino.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26*86d7f5d3SJohn Marino.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27*86d7f5d3SJohn Marino.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28*86d7f5d3SJohn Marino.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29*86d7f5d3SJohn Marino.\" SUCH DAMAGE. 30*86d7f5d3SJohn Marino.\" 31*86d7f5d3SJohn Marino.\" @(#)arithmetic.6 8.1 (Berkeley) 5/31/93 32*86d7f5d3SJohn Marino.\" $FreeBSD: src/games/arithmetic/arithmetic.6,v 1.3 1999/08/27 23:28:52 peter Exp $ 33*86d7f5d3SJohn Marino.\" $DragonFly: src/games/arithmetic/arithmetic.6,v 1.4 2007/10/20 17:56:46 swildner Exp $ 34*86d7f5d3SJohn Marino.\" 35*86d7f5d3SJohn Marino.Dd May 31, 1993 36*86d7f5d3SJohn Marino.Dt ARITHMETIC 6 37*86d7f5d3SJohn Marino.Os 38*86d7f5d3SJohn Marino.Sh NAME 39*86d7f5d3SJohn Marino.Nm arithmetic 40*86d7f5d3SJohn Marino.Nd quiz on simple arithmetic 41*86d7f5d3SJohn Marino.Sh SYNOPSIS 42*86d7f5d3SJohn Marino.Nm 43*86d7f5d3SJohn Marino.Op Fl o Ar +-x/ 44*86d7f5d3SJohn Marino.Op Fl r Ar range 45*86d7f5d3SJohn Marino.Sh DESCRIPTION 46*86d7f5d3SJohn Marino.Nm 47*86d7f5d3SJohn Marinoasks you to solve problems in simple arithmetic. 48*86d7f5d3SJohn MarinoEach question must be answered correctly before going on to the next. 49*86d7f5d3SJohn MarinoAfter every 20 problems, it prints the score so far and the time taken. 50*86d7f5d3SJohn MarinoYou can quit at any time by typing the interrupt or end-of-file character. 51*86d7f5d3SJohn Marino.Pp 52*86d7f5d3SJohn MarinoThe options are as follows: 53*86d7f5d3SJohn Marino.Bl -tag -width ".Fl r Ar range" 54*86d7f5d3SJohn Marino.It Fl o Ar +-x/ 55*86d7f5d3SJohn MarinoBy default, 56*86d7f5d3SJohn Marino.Nm 57*86d7f5d3SJohn Marinoasks questions on addition of numbers from 0 to 10, and corresponding 58*86d7f5d3SJohn Marinosubtraction. 59*86d7f5d3SJohn MarinoBy supplying one or more of the characters 60*86d7f5d3SJohn Marino.Ar +-x/ , 61*86d7f5d3SJohn Marinoyou can ask for problems in addition, subtraction, multiplication, and 62*86d7f5d3SJohn Marinodivision, respectively. 63*86d7f5d3SJohn MarinoIf you give one of these characters more than once, that kind of problem 64*86d7f5d3SJohn Marinowill be asked correspondingly more often. 65*86d7f5d3SJohn Marino.It Fl r Ar range 66*86d7f5d3SJohn MarinoIf a 67*86d7f5d3SJohn Marino.Ar range 68*86d7f5d3SJohn Marinois supplied, 69*86d7f5d3SJohn Marino.Nm 70*86d7f5d3SJohn Marinoselects the numbers in its problems in the following way. 71*86d7f5d3SJohn MarinoFor addition and multiplication, the numbers to be added or multiplied 72*86d7f5d3SJohn Marinoare between 0 and 73*86d7f5d3SJohn Marino.Ar range , 74*86d7f5d3SJohn Marinoinclusive. 75*86d7f5d3SJohn MarinoFor subtraction and division, both the required result and the number to 76*86d7f5d3SJohn Marinodivide by or subtract will be between 0 and 77*86d7f5d3SJohn Marino.Ar range . 78*86d7f5d3SJohn Marino(Of course, 79*86d7f5d3SJohn Marino.Nm 80*86d7f5d3SJohn Marinowill not ask you to divide by 0.) The default 81*86d7f5d3SJohn Marino.Ar range 82*86d7f5d3SJohn Marinois 10. 83*86d7f5d3SJohn Marino.El 84*86d7f5d3SJohn Marino.Pp 85*86d7f5d3SJohn MarinoWhen you get a problem wrong, 86*86d7f5d3SJohn Marino.Nm 87*86d7f5d3SJohn Marinowill remember the numbers involved, and will tend to select those numbers 88*86d7f5d3SJohn Marinomore often than others, in problems of the same sort. 89*86d7f5d3SJohn MarinoEventually it will forgive and forget. 90*86d7f5d3SJohn Marino.Pp 91*86d7f5d3SJohn Marino.Nm 92*86d7f5d3SJohn Marinocannot be persuaded to tell you the right answer. 93*86d7f5d3SJohn MarinoYou must work it out for yourself. 94*86d7f5d3SJohn Marino.Sh DIAGNOSTICS 95*86d7f5d3SJohn Marino.Bl -diag 96*86d7f5d3SJohn Marino.It "What?" 97*86d7f5d3SJohn Marinoif you get a question wrong. 98*86d7f5d3SJohn Marino.It "Right!" 99*86d7f5d3SJohn Marinoif you get it right. 100*86d7f5d3SJohn Marino.It "Please type a number." 101*86d7f5d3SJohn Marinoif 102*86d7f5d3SJohn Marino.Nm 103*86d7f5d3SJohn Marinodoesn't understand what you typed. 104*86d7f5d3SJohn Marino.El 105*86d7f5d3SJohn Marino.Sh SEE ALSO 106*86d7f5d3SJohn Marino.Xr bc 1 , 107*86d7f5d3SJohn Marino.Xr dc 1 108