Answer:
#include <iostream>
using namespace std;
int main(){
int accountnum;

cout<<"Account Number: ";
cin>>accountnum;
int arrlength =*(&accountnumbers + 1) - accountnumbers;
int exist = 0;
for(int i =0;i<arrlength;i++){
if(accountnum == accountnumbers[i]){
cout<<"Valid account number";
exist = 1;
break;
}
}
if(exist == 0)
cout<<"Invalid account number";
return 0;
}
Explanation:
The solution is implemented in C++ (See attachment)
This declares user account number as integer
int accountnum;
This initializes the list of account numbers to an array

This prompt user for account number
cout<<"Account Number: ";
Here, user inputs the account number
cin>>accountnum;
This calculates the length of the array
int arrlength =*(&accountnumbers + 1) - accountnumbers;
This initializes a check variable to 0
int exist = 0;
This iterates through the array
for(int i =0;i<arrlength;i++){
This checks for valid account number.
if(accountnum == accountnumbers[i]){
If true, the following message is printed
cout<<"Valid account number";
The check variable is updated to 1, which implies that the account number is valid
exist = 1;
And the loop is terminated
break;
}
}
If the check variable is not updated, then the account number is invalid
<em> if(exist == 0)</em>
<em> cout<<"Invalid account number";</em>
return 0;