everytimes enter a new number
if the new number belongs to any number in oldnumber
program will show "the number is already exit"
but everytimes i enter number "1" to newnumber
the program will show both of the if else statements
i know where is the wrong but i don't how to fix this problems
#include <iostream>
#include <string>
usingnamespace std;
int main()
{
string oldnumber[5]={"1","2","3"};
string newnumber[5];
int size=3;
for (int i=size;i<10;i++)
{
cout<<"enter a new number:";
cin>>newnumber[size];
for (int j=0;j<size;j++)
{
if (newnumber[size]==oldnumber[j])
{
cout<<"your account number is already exit";
}
elseif (newnumber[size]!=oldnumber[j])
{
cout<<"the number you enter is"<<newnumber[size]<<endl;
}
}
}
return 0;
}