Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

arithmetic(6) [v7 man page]

ARITHMETIC(6)							   Games Manual 						     ARITHMETIC(6)

NAME
arithmetic - provide drill in number facts SYNOPSIS
/usr/games/arithmetic [ +-x/ ] [ range ] DESCRIPTION
Arithmetic types out simple arithmetic problems, and waits for an answer to be typed in. If the answer is correct, it types back "Right!", and a new problem. If the answer is wrong, it replies "What?", and waits for another answer. Every twenty problems, it publishes statis- tics on correctness and the time required to answer. To quit the program, type an interrupt (delete). The first optional argument determines the kind of problem to be generated; +-x/ respectively cause addition, subtraction, multiplication, and division problems to be generated. One or more characters can be given; if more than one is given, the different types of problems will be mixed in random order; default is +- Range is a decimal number; all addends, subtrahends, differences, multiplicands, divisors, and quotients will be less than or equal to the value of range. Default range is 10. At the start, all numbers less than or equal to range are equally likely to appear. If the respondent makes a mistake, the numbers in the problem which was missed become more likely to reappear. As a matter of educational philosophy, the program will not give correct answers, since the learner should, in principle, be able to calcu- late them. Thus the program is intended to provide drill for someone just past the first learning stage, not to teach number facts de novo. For almost all users, the relevant statistic should be time per problem, not percent correct. ARITHMETIC(6)

Check Out this Related Man Page

ARITHMETIC(6)							 BSD Games Manual						     ARITHMETIC(6)

NAME
arithmetic -- quiz on simple arithmetic SYNOPSIS
arithmetic [-o +-x/] [-r range] DESCRIPTION
arithmetic asks you to solve problems in simple arithmetic. Each question must be answered correctly before going on to the next. After every 20 problems, it prints the score so far and the time taken. You can quit at any time by typing the interrupt or end-of-file character. The options are as follows: -o By default, arithmetic asks questions on addition of numbers from 0 to 10, and corresponding subtraction. By supplying one or more of the characters +-x/, you can ask for problems in addition, subtraction, multiplication, and division, respectively. If you give one of these characters more than once, that kind of problem will be asked correspondingly more often. -r If a range is supplied, arithmetic selects the numbers in its problems in the following way. For addition and multiplication, the numbers to be added or multiplied are between 0 and range, inclusive. For subtraction and division, both the required result and the number to divide by or subtract will be between 0 and range. (Of course, arithmetic will not ask you to divide by 0.) The default range is 10. When you get a problem wrong, arithmetic will remember the numbers involved, and will tend to select those numbers more often than others, in problems of the same sort. Eventually it will forgive and forget. arithmetic cannot be persuaded to tell you the right answer. You must work it out for yourself. DIAGNOSTICS
``What?'' if you get a question wrong. ``Right!'' if you get it right. ``Please type a number.'' if arithmetic doesn't understand what you typed. SEE ALSO
bc(1), dc(1) BSD
May 31, 1993 BSD
Man Page

13 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

HELP ASAP.. pretty simple..

Hey guys.... couple questions... I am working a problem set and can't answer this: 1) Suppose you are in a directory that contains a file called "foo." You want to create a new file called "bar" that contains the sorted contents of "foo" in the parent directory of the one you're in. How... (8 Replies)
Discussion started by: ugakid
8 Replies

2. UNIX for Advanced & Expert Users

Create New User in Solaris 10

Dear All, I think this stupid question, but I was search in this forum and I not yet have get specific answer for my problem. I just installed Sun Solaris 10 in my box, and I want add new user, but there is can't work , I try this command useradd -u 1002 -g 102 -d /home/export/heru -s... (7 Replies)
Discussion started by: heru_90
7 Replies

3. Shell Programming and Scripting

Replacing characters in file with line break

Hi, Apologies if this has been asked before, but I searched and was not able to find an answer. It's probably a simple question to answer for those of you with some experience, though... I have a relatively long string where tokens are separated by the colon (':') character. Let's say the... (10 Replies)
Discussion started by: johnemb
10 Replies

4. Shell Programming and Scripting

kill multiple instances of the same program

Hi, I know that the answer to this is very simple, since I saw somebody do it some time back..but I forgot how. The problem is, I have multiple instances of the same program running simultaneously and I want to kill them all in a single command. I know that it can be done using awk '{print... (12 Replies)
Discussion started by: ipzig
12 Replies

5. AIX

VI Substitution problem

I'm having a problem getting my variables to work in dishing out an RMC script. The $1 works fine. $2 does not Here's a portion of the script: server=$1 filesystem1=$2 # dsh -w $1 'mkcondition -c "/var space used" -s "Name == \"$2\"" -e "PercentTotUsed > 90" -d "An event will be generated... (7 Replies)
Discussion started by: gravy26
7 Replies

6. Shell Programming and Scripting

Simple program but problem-pls Help

Hi All, I have problem in the following shell script (problem in 2and3 line i guess) #!/bin/sh set value1 = 90; set value2 = 70; if ; then echo "$value1 is normal" else echo "$value2 is abnormal" fi when executed output: $ value_test.sh (Enter) is abnormal Neither it's printing... (13 Replies)
Discussion started by: user__user3110
13 Replies

7. Shell Programming and Scripting

problem using ssh

Hi, I have 2 users say user a and user b both in different unix boxes. I thave to execute a script in user b via user a. I tried using ssh for it but my script is not getting executed. My script goes as: from user a- ssh userb@host " sh script.sh" script.sh is placed in user b... (11 Replies)
Discussion started by: Taranjeet Singh
11 Replies

8. Fedora

Simple arithmetic in shell

Hey, I just wanted to know how one can write simple arithmetic like addition, subtraction, multiplication and division in shell-script. (14 Replies)
Discussion started by: #moveon
14 Replies

9. Solaris

Please give me answer for these interview questions.

As i'm going to attend my first interview day after tomorrow, What should i need to answer if the interviewer asked me about 1. Tell me about your production environment. 2. What about your team size? 3. Tell me about the most critical situation/issue you have ever faced. Can any... (10 Replies)
Discussion started by: Sesha
10 Replies

10. Shell Programming and Scripting

Doing simple math for children.

Hello! I saw that there were a few differente ways to do math within bash scripts. expr and bc are possibilities. But which one to use when? I want to make an simple bash script for children to do math. The script must ask only questions like 1*1= till 10*10= ... No + or - or /... (10 Replies)
Discussion started by: ugurgazi
10 Replies

11. Shell Programming and Scripting

File modification problem

Hi, I have a file input.txt. cat input.txt output is as follows : I want the output looking like: cat output.txt I have a script. cat input.txt | tr -d '\n' | sed 's/\("name"\)/\1\n/g' > output.txt here I have to check "name" string and then enter newline. But I want the... (10 Replies)
Discussion started by: mnmonu
10 Replies

12. AIX

PowerVM/lpar creation problems

Hi, I'm a newbie to PowerVM and LPARs ( I work with VmWare and Oracle VM Server for Sparc) .recently we purchased an 8202-e4b server, with two enclosures for add'l disk capacity. it is licensed for PowerVM standard,came preloaded as such, AIX 7.1. I've set up HMC v8.2, and run it through a VM on... (30 Replies)
Discussion started by: computron
30 Replies

13. What is on Your Mind?

Private Messages.

Well I have just noticed over the years that I have PMs that I have not seen or even known about. Apologies if any of you have not had any replies to your PMs. It is too late now as some go back to my early days on here. The notification that comes up currently has notified me of a couple... (10 Replies)
Discussion started by: wisecracker
10 Replies