Skip to content

vmiller77/CalculatorREXX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CalculatorREXX

This is a REXX program that will allow you to make simple calculations.

Here are the rules of how to use the program

All calculations are done in an infix manner. For example:

3 - 5

NOT:

- 3 5 OR 3 5 -

Enter in your arguments with a space in between. For example: "3 + 5", not "3+5".

Functionality

You are able to add, subtract, multiply, divide and use exponents.

add: +

subtract: -

multiply: *

divide: /

exponent: E

The calculator will take higher precedence for exponents over multiplication and division, and higher precedence for multiplication and division over addition and subtraction.

Examples

Here are some examples you can use to guid your usage of the program.

Exponents:

2 E 2 returns 4

2 E 3 returns 8

Multiplication:

3 * 2 returns 6

Division:

5 / 2 returns 2.5

Addition:

3 + 2 returns 5

Subtraction:

2 - 1 returns 1

Using fractions:

2.4 + 3 returns 5.4

Make sure you use decimal format for fractions. Do not use 3/4, use .75.

Using negatives:

5 + -1 returns 4

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages