same elements in array

Write your question here.


I would ask you to help me with this problem:you have an array(input) and then the output is the same array but without the duplicates, e.g. 1 4 4 5 input, 1 5 output.
What have you done so far? Also a list does exactly that but if your teacher wants you to use statically created arrays you will have to use an outer loop with an inner loop.
Actually i am a beginner, and i am looking for a simple idea.I don't know what to do after for(int i=0;i<100;i++) cin>>array[i]
you should actually input to a temporary variable then check if that value is in the array already if not (after looping through all the set values ) then add it to the array and increment the items set in the array so you know how long to loop the next time around.
Topic archived. No new replies allowed.