Formula 2.1

 
     
       

DIRECTORY
   

/* Formula 2.1*/

#include <stdio.h>

main ( )
{
  int joy, pain;
  joy = 1;
  pain = 0;
  /* start with the benefit of the doubt */
  while (joy > 0 || joy >= pain)
    {
      /* How is life for you? */
      printf (What is your current level of joy?);
      scanf (%d, &joy);
      printf (What is your current level of pain?);
      scanf (%d, &pain);
      if (joy > pain)
	{
	  laugh();
	  love();
	  smile();
	}
      else if (pain > joy)
	{
	  cry();
	  suffer();
	  scream();
	}
      else
	{
	  numbness();
	  confusion();
	  transition();
	}
    }
  /* Time to go. */
  printf (Goodbye.\n);
}

/* megazone, scary, comment out the bogus functions and it compiles, 9/12/93 */

       
Weblint Validated!
Image: Valid HTML 4.0!
  © Copyright 1997, MegaZone, megazone@megazone.org Revised Wednesday January 12, 2000 16:37 EST