I am trying to write a program that will tell whether or not to go to work based on the day of the week entered by the user. Here is what I have so far.
Code:
#include <stdio.h>
#define TRUE 1
#define FALSE 0
void dayofweek();
int main()
{
char today[100];
int i;
enum week {Monday = 0, Tuesday = 1, Wednesday = 2, Thursday = 3, Friday = 4, Saturday = 5, Sunday = 6};
printf ("Enter the day of the week (eg. Wednesday) :\n");
scanf ("%c", today[]);
dayofweek (today);
return 0;
}
void dayofweek(char today[])
{
if (today = 0; today < 5; today++)
printf ("GO TO WORK!!");
else
printf("You can rest today");
}