[Solved] if (x==0||7||14||21||-7||-14) {y=THURSDAY;} [closed]


in c anything other than 0 is considered boolean true. so your if can be read like:
if x==0 or true or true or true…
what you probably meant was if (x==0 || x==7 || x==14 ...)

1

solved if (x==0||7||14||21||-7||-14) {y=THURSDAY;} [closed]