## biorhythm

General FreeBASIC programming questions.
srvaldez
Posts: 2483
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)))#endmacrocls input "please enter your birth date (m,d,yyyy) ";bmonth,bday,byearprint input "please enter present date (m,d,yyyy) ";pmonth,pday,pyearbm = bmonthbd = bdayby = byearif 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 = fpm = pmonthpd = pdaypy = pyearif 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 - kcls locate 17, 1print string(100, "-")d = kfor 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 + 1next jlocate 35, 1print "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

OMG! I haven't seen that in years!