may_I_call_you / *code * / by Mainon A Schwartz/**
* may_I_call_you.c
*
* For those of us who just can't muster it in English...
* (Yes, this really compiles and executes.)
*/
#include
#define boolean int
#define TRUE 1
#define FALSE 0
typedef struct
{
char number[10];
}
phoneNumber;
phoneNumber yourNumber = {'0','0','0','0','0', /* I'm dying to know. */
'0','0','0','0','0'};
boolean iHaveYourNumber = FALSE;
char *youAreCute = "You are cute.n";
phoneNumber hereIsWhatToDo (void);
void replyWith (char *message);
phoneNumber hereIsWhatToDo (void)
{
if (iHaveYourNumber)
{
replyWith (youAreCute); /* I'm sorry. */
return (yourNumber); /* Because, really, you're nice, too. */
}
else
return (yourNumber); /* YYYYEEESSSSS!!!! */
}
int main ()
{
char in;
printf ("Do I have your number yet? ");
if (((in = getchar()) == 'y') || (in == 'Y'))
iHaveYourNumber = TRUE;
hereIsWhatToDo(); /* I'm confused, anyway... */
return (0);
}
void replyWith (char *message)
{
fprintf (stdout, message);
}12/11/2003 Author's Note: Computer geniuses can be poets too. Phil Hargot deserves the lion's share of credit for this one.
Posted on 12/11/2003 Copyright © 2024 Mainon A Schwartz
|