Can anyone tell me whats wrong with my code? It has some syntax error in line 22,24 and 26 and when theres no syntax error it says its the weekend no matter what i type.
Code:
#include <stdio.h>
int main () {
char S, M, T, W, R, F, A, day;
int hour;
printf("Enter day of Week (S M T W R F A): ");
scanf("%c", &day);
if (day == S || A)
printf("It's the weekend!\n");
else if (day != S || M || T || W || R || F || A)
printf("Invalid day entered.\n");
else if (day == M || T || W || R || F || A || S)
printf("Enter hour (0-23):\n");
scanf("%d", &hour);
if (hour >=0 && <8)
printf("Still asleep\n");
else if (hour >=8 && <18)
printf("Should be at work\n");
else if (hour >=18 && <24)
printf("Off work\n");
else printf("Hour Invalid\n");
return 0;
}