Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a[]={1,2,2,1,3,4,5,3,3};
- for(int i=0;i<10;i++)
- {
- bool equal=false;
- for(int j=i-1;j>=0;j--)
- {
- if(a[i]==a[j])
- {
- equal=true;
- }
- }
- if(!equal)
- {
- cout<<a[i]<<endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment