Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int arr[1000];
- int i,n;
- printf("Enter number ");
- scanf("%d",&n);
- for(i=0;i<n;i++)
- {
- scanf("%d",&arr[i]);
- }
- for(i=0;i<n;i++)
- {
- if(arr[i]==arr[i+1])
- continue ;
- printf("%d",arr[i]);
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment