#include <iostream>
using namespace std;
const int tab[4] = {0, 1, 4, 99};
bool isInArray(int num) {
for (int i = 0; i < 5; i++) {
if (tab[i] == num) {
return true;
}
}
return false;
}
int main() {
for (int i = 0; i <= 5; i++) {
if (isInArray(i)) {
cout << i << " is in array!\n";
} else {
cout << i << " is not in array!\n";
}
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IHRhYls0XSA9IHswLCAxLCA0LCA5OX07Cgpib29sIGlzSW5BcnJheShpbnQgbnVtKSB7Cglmb3IgKGludCBpID0gMDsgaSA8IDU7IGkrKykgewoJCWlmICh0YWJbaV0gPT0gbnVtKSB7CgkJCXJldHVybiB0cnVlOwoJCX0KCX0KCXJldHVybiBmYWxzZTsKfQoKaW50IG1haW4oKSB7Cglmb3IgKGludCBpID0gMDsgaSA8PSA1OyBpKyspIHsKCQlpZiAoaXNJbkFycmF5KGkpKSB7CgkJCWNvdXQgPDwgaSA8PCAiIGlzIGluIGFycmF5IVxuIjsKCQl9IGVsc2UgewoJCQljb3V0IDw8IGkgPDwgIiBpcyBub3QgaW4gYXJyYXkhXG4iOwoJCX0KCX0KCQoJcmV0dXJuIDA7Cn0=