Ok, here's another one if anyone is willing to help. The source compiles fine, but when I execute the program, I get a whole bunch of errors.. I believe the bug has to be somewhere in the "lucky number" part of the program.
Code:
#include <stdio.h>
main()
{
int randomNum;
srand(time());
randomNum = (rand() %4) + 1;
printf("\n\n\nFortune cookie say..\n");
switch (randomNum)
{
case 1:
printf("\nHim with little shovel, not do big dig.\n");
break;
case 2:
printf("\nBoiled rice better then fried rice.\n");
break;
case 3:
printf("\nIf ghost scare you in dream, wake up.\n");
break;
case 4:
printf("\nConfucious is philosopher, not chef.\n");
break;
}
printf("\n\nYour lucky number is...\n");
printf("%d ", (rand() % 49) +1);
}