Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 132,628 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,036 people online right now. Registration is fast and FREE... Join Now!




find the single number

 
Reply to this topicStart new topic

find the single number

amitx
post 27 Mar, 2006 - 04:54 AM
Post #1


New D.I.C Head

*
Joined: 2 Feb, 2006
Posts: 10


My Contributions


given a array of numbers except of one number all the others occur twice. find the number which is only once.
User is offlineProfile CardPM

Go to the top of the page

Amadeus
post 27 Mar, 2006 - 06:51 AM
Post #2


g++ -o drink whiskey.cpp

Group Icon
Joined: 12 Jul, 2002
Posts: 12,176



Thanked 33 times

Dream Kudos: 25
My Contributions


The site has a policy by which we are more than happy to help users with their academic assignments, but we do require that some good faith effort is shown by the user. If you could please post the code you have written in an attempt to solve this assignment, we would be pleased to provide some guidance.
User is offlineProfile CardPM

Go to the top of the page

Mrafcho001
post 27 Mar, 2006 - 01:28 PM
Post #3


D.I.C Addict

Group Icon
Joined: 1 Nov, 2005
Posts: 753



Thanked 5 times

Dream Kudos: 120
My Contributions


just compare every number in the array with the rest of the numbers and if one number doesnt have a match than that's the number..

It can be done in a simple for loop
User is offlineProfile CardPM

Go to the top of the page

Reply to this topicStart new topic
Time is now: 11/23/08 03:46AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month