biorhythm

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

biorhythm

Postby srvaldez » Mar 02, 2020 3:51

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
input "please enter your birth date (m,d,yyyy) ";bmonth,bday,byear
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: 553
Joined: Mar 10, 2007 15:44
Location: Ohio, USA
Contact:

Re: biorhythm

Postby bcohio2001 » Mar 08, 2020 3:29

OMG! I haven't seen that in years!

Return to “General”

Who is online

Users browsing this forum: No registered users and 5 guests