Click here to Skip to main content
15,910,303 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralLet me know my mistake in arrays program!! Pin
Member 188014615-Apr-05 5:18
Member 188014615-Apr-05 5:18 
GeneralRe: Let me know my mistake in arrays program!! Pin
David Crow15-Apr-05 5:29
David Crow15-Apr-05 5:29 
GeneralRe: (modified)Let me know my mistake in arrays program!! Pin
namaskaaram15-Apr-05 5:33
namaskaaram15-Apr-05 5:33 
GeneralRe: Let me know my mistake in arrays program!! Pin
Michael Dunn15-Apr-05 6:00
sitebuilderMichael Dunn15-Apr-05 6:00 
GeneralRe: Let me know my mistake in arrays program!! Pin
David Crow15-Apr-05 6:24
David Crow15-Apr-05 6:24 
GeneralRe: Let me know my mistake in arrays program!! Pin
Maximilien15-Apr-05 6:38
Maximilien15-Apr-05 6:38 
GeneralRe: Let me know my mistake in arrays program!! Pin
namaskaaram15-Apr-05 19:38
namaskaaram15-Apr-05 19:38 
GeneralRe: Let me know my mistake in arrays program!! Pin
Bob Flynn15-Apr-05 9:16
Bob Flynn15-Apr-05 9:16 
Your loop structure is wrong. You should use a while loop to count the number of correct numbers (unique numbers between 20 and 100).

input your candidate value
while the number of unique numbers between 20 and 100 is less than 10 do the following
if candidate value is valid then assign it to your array and incremment your valid numbers count
get the next candidate value.

to check the validity of your candidate value you have to do the range check as you already figured out, and then you have to search through your array (up to the current number of valid values) for any values that are equal. If you find a match then your value is not valid.

This should give you some help. But as stated, your assignments will not be done for you. Try to put this description into code. And let me know if you have further trouble. Do it quick I probably will not be online much longer. Its the weekend and I have house work to do Frown | :(
GeneralRe: Let me know my mistake in arrays program!! Pin
David Crow15-Apr-05 9:52
David Crow15-Apr-05 9:52 
GeneralRe: Let me know my mistake in arrays program!! Pin
Bob Flynn15-Apr-05 10:13
Bob Flynn15-Apr-05 10:13 
GeneralRe: Let me know my mistake in arrays program!! Pin
ThatsAlok15-Apr-05 19:52
ThatsAlok15-Apr-05 19:52 
GeneralRe: Let me know my mistake in arrays program!! Pin
ng kok chuan17-Apr-05 15:37
ng kok chuan17-Apr-05 15:37 
GeneralRe: Let me know my mistake in arrays program!! Pin
ThatsAlok17-Apr-05 18:17
ThatsAlok17-Apr-05 18:17 
GeneralIcon of dialog in taskbar Pin
Hans Ruck15-Apr-05 5:11
Hans Ruck15-Apr-05 5:11 
GeneralRe: Icon of dialog in taskbar Pin
ThatsAlok15-Apr-05 20:48
ThatsAlok15-Apr-05 20:48 
GeneralRe: Icon of dialog in taskbar Pin
Hans Ruck15-Apr-05 22:43
Hans Ruck15-Apr-05 22:43 
GeneralRe: Icon of dialog in taskbar Pin
ThatsAlok15-Apr-05 22:54
ThatsAlok15-Apr-05 22:54 
GeneralRe: Icon of dialog in taskbar Pin
Hans Ruck15-Apr-05 22:59
Hans Ruck15-Apr-05 22:59 
GeneralRe: Icon of dialog in taskbar Pin
ThatsAlok15-Apr-05 23:15
ThatsAlok15-Apr-05 23:15 
GeneralConfiguration/source control for a Visual Studio project Pin
Polly Parrot15-Apr-05 4:30
Polly Parrot15-Apr-05 4:30 
GeneralRe: Configuration/source control for a Visual Studio project Pin
Polly Parrot15-Apr-05 4:36
Polly Parrot15-Apr-05 4:36 
GeneralRe: Configuration/source control for a Visual Studio project Pin
Taka Muraoka15-Apr-05 19:53
Taka Muraoka15-Apr-05 19:53 
Questionwho can tell me WHY? Pin
simon wan15-Apr-05 4:13
simon wan15-Apr-05 4:13 
AnswerRe: who can tell me WHY? Pin
namaskaaram15-Apr-05 4:38
namaskaaram15-Apr-05 4:38 
AnswerRe: who can tell me WHY? Pin
Bob Stanneveld15-Apr-05 5:09
Bob Stanneveld15-Apr-05 5:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.