#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int arr[20];
for (int i=0;i<20;i++)
{
cout<<"enter
the element no "<<i+1<<endl;
cin>>arr[i];
}
for (i=0;i<20;i++)
{
for
(int j=0;j<20;j++)
{
if
(i!=j)
{
if
(arr[i]==arr[j])
arr[j]=0;
else
continue;
}
else
continue;
}
}
for (i=0;i<20;i++)
{
if
(arr[i]<=100&&arr[i]>=10)
cout<<arr[i]<<endl;
else
continue;
}
getch();
}
OUTPUT:
enter the element no 1
1
enter the element no 2
11
enter the element no 3
12
enter the element no 4
113
enter the element no 5
14
enter the element no 6
15
enter the element no 7
16
enter the element no 8
17
enter the element no 9
18
enter the element no 10
19
enter the element no 11
10
enter the element no 12
11
enter the element no 13
12
enter the element no 14
13
enter the element no 15
14
enter the element no 16
15
enter the element no 17
16
enter the element no 18
17
enter the element no 19
23
enter the element no 20
34
11
12
14
15
16
17
18
19
10
13
23
34
No comments:
Post a Comment