Click here to Skip to main content
16,005,316 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Need help with fread & fwrite Pin
David Crow18-Apr-05 5:19
David Crow18-Apr-05 5:19 
QuestionHow to create global variable in atl project Pin
Anonymous16-Apr-05 0:10
Anonymous16-Apr-05 0:10 
AnswerRe: How to create global variable in atl project Pin
ThatsAlok16-Apr-05 0:30
ThatsAlok16-Apr-05 0:30 
GeneralRe: How to create global variable in atl project Pin
Anonymous16-Apr-05 0:52
Anonymous16-Apr-05 0:52 
QuestionHow to create object of ATL class Pin
Anonymous15-Apr-05 23:41
Anonymous15-Apr-05 23:41 
AnswerRe: How to create object of ATL class Pin
ThatsAlok16-Apr-05 0:14
ThatsAlok16-Apr-05 0:14 
Generalproblem in setting value in component Pin
Anonymous15-Apr-05 23:14
Anonymous15-Apr-05 23:14 
Generalwherez my mistake!! Pin
Member 188014615-Apr-05 22:36
Member 188014615-Apr-05 22:36 
below is my code the whole program is for prompting user to enter 10 nos. b/w 20 to 100 it will 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 but at end it is not displaying correct resultCry | :(( Confused | :confused: . plz check the code n tell me wherz my mistake.


#include<conio.h>
#include<iostream.h>
#include<stdio.h>
main()
{
int nTmp,j;
//declares variable bflag th be of type bool & intializes bflag to false
//bool is a data type whose value may be false or true
bool bFlag=false;
int a[10];
cout<<"entr 10 numbers b/w 20 and 100"<<endl;
="" for(int="" i="0;i<10;i++)" {="" cout<<"enter="" value"<<endl;
="" cin="">>nTmp;
while(!bFlag)
{
////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;
}
j=0;
while(j<=i)
{
if(a[j++]==nTmp)
{
bFlag=false;

}
bFlag=true;
}
if(bFlag==true)
{
//save variable
a[i]=nTmp;
}
}
//again make it false
bFlag=false;
}
cout<<" the non dublicate nos are "<
GeneralRe: wherez my mistake!! Pin
ThatsAlok15-Apr-05 23:00
ThatsAlok15-Apr-05 23:00 
GeneralRe: wherez my mistake!! Pin
Member 188014615-Apr-05 23:04
Member 188014615-Apr-05 23:04 
GeneralRe: wherez my mistake!! Pin
ThatsAlok15-Apr-05 23:18
ThatsAlok15-Apr-05 23:18 
GeneralRe: wherez my mistake!! Pin
Member 188014615-Apr-05 23:28
Member 188014615-Apr-05 23:28 
GeneralRe: wherez my mistake!! Pin
ThatsAlok20-Apr-05 19:58
ThatsAlok20-Apr-05 19:58 
GeneralGDI+ graphics path casting Pin
mrCrisp15-Apr-05 21:53
mrCrisp15-Apr-05 21:53 
GeneralRe: GDI+ graphics path casting Pin
Ben Burnett18-Apr-05 9:46
Ben Burnett18-Apr-05 9:46 
GeneralWM_KEYDOWN Pin
unidentify15-Apr-05 20:31
unidentify15-Apr-05 20:31 
GeneralRe: WM_KEYDOWN Pin
ugur_basak15-Apr-05 20:39
ugur_basak15-Apr-05 20:39 
GeneralRe: WM_KEYDOWN Pin
22491715-Apr-05 20:50
22491715-Apr-05 20:50 
GeneralRe: WM_KEYDOWN Pin
ThatsAlok15-Apr-05 20:56
ThatsAlok15-Apr-05 20:56 
GeneralRe: WM_KEYDOWN Pin
22491715-Apr-05 21:09
22491715-Apr-05 21:09 
GeneralRe: WM_KEYDOWN Pin
ThatsAlok15-Apr-05 21:20
ThatsAlok15-Apr-05 21:20 
GeneralRe: WM_KEYDOWN Pin
22491716-Apr-05 1:49
22491716-Apr-05 1:49 
GeneralRe: WM_KEYDOWN Pin
ThatsAlok17-Apr-05 18:53
ThatsAlok17-Apr-05 18:53 
GeneralRe: WM_KEYDOWN Pin
ThatsAlok15-Apr-05 20:55
ThatsAlok15-Apr-05 20:55 
GeneralReading blank lines Pin
nilkn15-Apr-05 18:00
sussnilkn15-Apr-05 18:00 

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.