## biorhythm

General FreeBASIC programming questions.
srvaldez
Posts: 2686
Joined: Sep 25, 2005 21:54

### biorhythm

silly biorhythm

Code: Select all

dim as integer bday, bmonth, d, f, by, bd, j, bm, pm, pd, py, k, ph, byear, em, pmonth, pday, pyear, in, s
#macro af(b)
int(17 - 16 *  sin (6.283185307179586 * d / (b)))
#endmacro
cls
print
input "please enter present date (m,d,yyyy) ";pmonth,pday,pyear
bm = bmonth
bd = bday
by = byear
if bmonth < 3 then f = 365 * by + bd + 31 * (bm - 1) +  int ((by - 1) / 4) -  int (.75 * ( int (((by - 1) / 100) + 1)))
if bmonth > 2 then f = 365 * by + bd + 31 * (bm - 1) -  int (.4 * bm + 2.3) +  int (by / 4) -  int (.75 *  int (by / 100) + 1)
k = f
pm = pmonth
pd = pday
py = pyear
if bmonth < 3 then f = 365 * py + pd + 31 * (pm - 1) +  int ((py - 1) / 4) -  int (.75 * ( int (((py - 1) / 100) + 1)))
if bmonth > 2 then f = 365 * py + pd + 31 * (pm - 1) -  int (.4 * pm + 2.3) +  int (py / 4) -  int (.75 *  int (py / 100) + 1)
k = f - k
cls
locate 17, 1
print string(100, "-")
d = k
for j = 1 to 33
ph =  af(23)
em =  af(28)
in =  af(33)
s = 100 * j / 33
locate ph,s
print iif(ph = em or ph = in, "x", "p")
locate em,s
print iif(em = ph or em = in, "x", "e")
locate in,s
print iif(in = ph or in = em, "x", "i")
d = d + 1
next j
locate 35, 1
print "p = physical"
print "e = emotional"
print "i = intelectual"
print "x = overlap"
sleep
bcohio2001
Posts: 556
Joined: Mar 10, 2007 15:44
Location: Ohio, USA
Contact:

### Re: biorhythm

OMG! I haven't seen that in years!