fork download
  1. #include <cstdio>
  2. #include <cassert>
  3.  
  4. bool check(int x) {
  5. auto a = (12 <= x <= 0);
  6. auto b = (12 <= x <= 7);
  7. return a && b;
  8. }
  9.  
  10. int main(void) {
  11. // invalid
  12. assert(check(12) == false);
  13.  
  14. // valid
  15. assert(check(11));
  16. assert(check(10));
  17. assert(check(0));
  18. assert(check(1));
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 4492KB
stdin
Standard input is empty
stdout
Standard output is empty