#include <iostream>
using namespace std;
int main() {
int a[10], i, n, c = 0;
cout << "Enter 10 numbers:\n";
for (i = 0; i < 10; i++) {
cin >> a[i];
}
cout << "Enter the number to be searched: ";
cin >> n;
for (i = 0; i < 10; i++) {
if (n == a[i]) {
cout << "\nNumber " << n << " found at position " << i + 1 << endl;
c = 1;
}
}
if (c == 0) {
cout << "\nNumber " << n << " is not found." << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAgICBpbnQgYVsxMF0sIGksIG4sIGMgPSAwOwoKICAgIGNvdXQgPDwgIkVudGVyIDEwIG51bWJlcnM6XG4iOwogICAgZm9yIChpID0gMDsgaSA8IDEwOyBpKyspIHsKICAgICAgICBjaW4gPj4gYVtpXTsKICAgIH0KCiAgICBjb3V0IDw8ICJFbnRlciB0aGUgbnVtYmVyIHRvIGJlIHNlYXJjaGVkOiAiOwogICAgY2luID4+IG47CgogICAgZm9yIChpID0gMDsgaSA8IDEwOyBpKyspIHsKICAgICAgICBpZiAobiA9PSBhW2ldKSB7CiAgICAgICAgICAgIGNvdXQgPDwgIlxuTnVtYmVyICIgPDwgbiA8PCAiIGZvdW5kIGF0IHBvc2l0aW9uICIgPDwgaSArIDEgPDwgZW5kbDsKICAgICAgICAgICAgYyA9IDE7ICAKICAgICAgICB9CiAgICB9CgogICAgaWYgKGMgPT0gMCkgewogICAgICAgIGNvdXQgPDwgIlxuTnVtYmVyICIgPDwgbiA8PCAiIGlzIG5vdCBmb3VuZC4iIDw8IGVuZGw7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0K