Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- const int MAX = 133000000;
- int main() {
- ios_base::sync_with_stdio(false);
- cout << "function isEven(n) {\n";
- cout << " switch(n) {\n";
- cout << " case 0:\n";
- cout << " return undefined;\n";
- for (int i = 1; i <= MAX; i++) {
- cout << " case " << i << ":\n";
- cout << " return " << (i % 2 == 0 ? "true" : "false") << ";\n";
- }
- cout << " }\n";
- cout << "}";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment