944,117 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 2220
  • C RSS
Oct 28th, 2004
0

plz help me out guys!!!!!!!!

Expand Post »
hi guys......
i have a problem in writing a program of "how to delete the duplicate elements in an array"
for example....if i enter an array like:
10 20 30 40 30
then it should print:
10 20 30 40

so could plz help me out?????
i have attempted little though....but don't know how can i go ahead....

#include<stdio.h>
#include<conio.h>
int main(void)
{
int a[5],i,j;
clrscr();
printf("ENTER ARRAY ELEMENTS:");
for(i=0;i<5;i++)
scanf("%d",&a[i]);
fflush(stdin);
for(i=0;i<5;i++)
{
for(j=i;j<4;j++)
{

//i don't know now where do i go....from here on.....how to find the element which is repeating that is the duplicate and then how to delete that.....
so plz help me out......
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
galmca is offline Offline
47 posts
since Oct 2004
Oct 28th, 2004
0

Re: plz help me out guys!!!!!!!!

I'm never going to answer another question of yours again. Clearly you have no respect for the people that volunteer their time to help you. First you bump your thread before a satisfactory amount of time has passed (a few days I could understand, but not less than 30 minutes), then you post a second thread with the same question. So I will now show you the same respect you have shown me.

*plonk*
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: Only three answers ???
Next Thread in C Forum Timeline: Programming with MS Agent ?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC