Click here to Skip to main content
15,907,001 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: WINDOWS Directory Pin
ddmcr16-Apr-05 8:15
ddmcr16-Apr-05 8:15 
GeneralRe: WINDOWS Directory Pin
toxcct16-Apr-05 9:39
toxcct16-Apr-05 9:39 
GeneralRe: WINDOWS Directory Pin
Ehsan Baghaki20-Apr-05 21:00
Ehsan Baghaki20-Apr-05 21:00 
GeneralPlease help me! Pin
dSolariuM16-Apr-05 6:42
dSolariuM16-Apr-05 6:42 
GeneralRe: Please help me! Pin
22491716-Apr-05 7:06
22491716-Apr-05 7:06 
GeneralRe: Please help me! Pin
Alexander M.,16-Apr-05 10:02
Alexander M.,16-Apr-05 10:02 
GeneralRe: Please help me! Pin
dSolariuM18-Apr-05 4:27
dSolariuM18-Apr-05 4:27 
Generalplz help me in dis code!! Pin
Member 188014616-Apr-05 4:23
Member 188014616-Apr-05 4:23 
below is my code the whole program is for prompting user to enter 10 nos. b/w 20 to 100 while is there to check wheter the user entr the corect number or not, it will also check that the entered number is unique and was not previously entered by the user. at end of program simply it will display the non dublicate nos. whole program is correct and output is also correct but this program is taking integers in place of dublicate numbers. suppose the user enter 50, 60, 70, 89, 56, 200, 47, 50, 56, 95 and 21 here 56 and 50 are dublicate values my program is taking 2 values in place of them. what should i do as i don't want any other value in place of dublicate values. i simply want to display values (from abve example) 50, 60, 70, 89, 56, 47, 95, 21.



#include<iostream>
#include<conio.h>

using namespace std;

int main()
{
int nTmp,i,j;
bool bFlag=false;
int a[10];
cout<<"entr 10 numbers b/w 20 and 100"<<endl;
="" for(i="0;i<10;i++)" {="" while(!bflag)
="" cout<<"enter="" value"<<endl;
="" cin="">>nTmp;
////Here we check first Condition
// no between 20 and 100
while((nTmp<20)||(nTmp>100))
{
cout<<"enter no b/w 20 and 100"<<endl;
="" cin="">>nTmp;
}
for(j=0;j<i;j++)
="" {
="" for="" checking="" whether="" the="" value="" is="" dublicate="" or="" not="" if(a[j]="=nTmp)" break;
="" }
="" }="" if(j="=i)" {="" save="" variable="" a[i]="nTmp;" bflag="true;
" again="" make="" it="" false
="" display="" non="" numbers.
="" cout<<"="" nos="" are="" "<<endl;
="" for(j="0;j<10;j++)" cout<<a[j]<<endl;
="" getch();
}="" <="" b="">

Rose

GeneralRe: plz help me in dis code!! Pin
Alexander M.,16-Apr-05 9:57
Alexander M.,16-Apr-05 9:57 
GeneralRe: plz help me in dis code!! Pin
David Crow16-Apr-05 17:15
David Crow16-Apr-05 17:15 
GeneralHelp with derived class Pin
ddmcr16-Apr-05 4:12
ddmcr16-Apr-05 4:12 
GeneralRe: Help with derived class Pin
John M. Drescher16-Apr-05 4:59
John M. Drescher16-Apr-05 4:59 
GeneralRe: Help with derived class Pin
ddmcr16-Apr-05 5:09
ddmcr16-Apr-05 5:09 
GeneralRe: Help with derived class Pin
John M. Drescher16-Apr-05 5:32
John M. Drescher16-Apr-05 5:32 
GeneralRe: Help with derived class Pin
David Crow18-Apr-05 4:26
David Crow18-Apr-05 4:26 
GeneralRe: Help with derived class Pin
Blake Miller18-Apr-05 8:29
Blake Miller18-Apr-05 8:29 
GeneralRe: Help with derived class Pin
David Crow18-Apr-05 9:32
David Crow18-Apr-05 9:32 
GeneralRe: Help with derived class Pin
Blake Miller18-Apr-05 9:54
Blake Miller18-Apr-05 9:54 
GeneralRe: Help with derived class Pin
David Crow18-Apr-05 10:06
David Crow18-Apr-05 10:06 
GeneralButton Create Pin
Francis Chau16-Apr-05 4:06
Francis Chau16-Apr-05 4:06 
GeneralRe: Button Create Pin
PJ Arends16-Apr-05 6:37
professionalPJ Arends16-Apr-05 6:37 
GeneralRe: Button Create Pin
Francis Chau16-Apr-05 18:15
Francis Chau16-Apr-05 18:15 
Questionhow to recognize &quot;real&quot; printer in EnumPrinters? Pin
sstoyan16-Apr-05 3:52
sstoyan16-Apr-05 3:52 
AnswerRe: how to recognize &quot;real&quot; printer in EnumPrinters? Pin
Alexander M.,16-Apr-05 11:20
Alexander M.,16-Apr-05 11:20 
GeneralRe: how to recognize &quot;real&quot; printer in EnumPrinters? Pin
sstoyan17-Apr-05 4:43
sstoyan17-Apr-05 4:43 

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.