120Views6Replies

# BAATCH code - Math Problem? Answered

Heey! I wanna make a .BAT program that'll help me do homework. I'm lazy to type the same formula to calculator, so I wanna make a program with preset formula.

I wanna make the program solve this formula: S=3,14*r2 and O=3,14*d - Surface and Circuit of a cirle (I'm not english, my english's not the best). I wanna make the program solve these formulas.

When you type r=3, it will say CIRCUIT IS (r*2 and then 3,14*'the r*2') AND SURFACE IS (3,14*r2 - the 2 should be in upper right corner)
When you type d=3, it will say CIRCUIT IS (3,14*d) and SIZE IS (d:2 and then 3,14*'d:2 answer'2 - again, 2 in upper right corner.

Tags:

## Discussions

The forums are retiring in 2021 and are now closed for new topics and comments.

I'm a big fan of GNU Octave.
https://www.gnu.org/software/octave/

It's free. It will run under Windows or Linux, or maybe other OSes too.

Basically it will do everything an expensive graphing calculator can do, and more.

As other answerers have suggested, you can solve your little math problems using a spreadsheet like MS(r) Excel(r), or LibreOffice(r) Calc(r), but spreadsheets are kinda goofy.

If I remember correctly, with spreadsheets, all the cells are named after their locations in the the A-ZZZZ, 1-infinity, plane, like, \$A\$1, \$G\$5, etc, and all your formulas end up full of of those cell pointers, and it's kinda ugly to look at, in my opinion.

In contrast, Octave has more natural looking varible assignment, stuff like "a=5", to say assign the varible "a" a value of 5.

Actually if you want experience what Octave feels like, to try it without the hassle of installing it, go to

http://octave-online.net/

Then click the button that says "Start Using Octave Online". Then just start typing at the command line.

Try typing (or copy-pasting):

r=5, C=2*pi*r, S=pi*r^2

And see if you like what it gives you back.

The special word, "pi", is one of Octave's built in variables.

Sometimes i need to take polar coordinates to x,y for 36 sq 4 pin LEDs on a round PC lamp, and a spread sheet neatly replicates math to the nearest .oo1" for all of the polar distribution spacing LED centers at once.