#include <iostream>
int main()
{
int array[] = {5658845, 8080152, 1005231, 4520125, 4562555, 6545231, 7895122, 5552012, 3852085, 8777541, 5050552,
7576651, 8451277, 7825877, 7881200, 1302850, 1250255, 4581002};
const int n = sizeof(array) / sizeof(array[0]);
std::cout << "Enter number: ";
int number = 0;
std::cin >> number;
for (int i = 0; i < n; ++i)
{
if (array[i] == number)
{
std::cout << "This number is valid" << std::endl;
return 0;
}
}
std::cout << "This number is invalid" << std::endl;
}
Comments
Leave a comment