void nhapkhongtrung(int a[],int &n)
{
cout<<"nhap n: ";
cin>>n;
int i=0;
do
{ int flag=0;
cout<<"nhap vao phan tu thu"<<i<<": ";
cin>>a[i];
for(int j=i-1;j>=0;j--)
if(a[i]==a[j])
{
cout<<"ban nhap sai: \n";
flag=1;
break;
}
if(flag==1)continue;
else
i++;
}
while (i<n);
}
Thursday, July 11, 2013
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment