first script for bc

This commit is contained in:
shockrahwow 2019-09-26 11:18:58 -07:00
parent 63bb0b961d
commit 942ed082f8

18
312/notes/math.bc Normal file
View File

@ -0,0 +1,18 @@
# What is this?
# Compilation of scripts to written for bc since bc is:
# a. literally a calculator
# b. code is pretty dang readable and useful
# Simple GCD
define gcd(a,b) {
while(a != b) {
if(a>b) {
a = a - b;
}
if(b>a) {
b = b - a;
}
}
return a;
}