The par that is bold is about checking for double, I have tried any thing I could but it doesn't work...please help me on this. ( Please let me know if the hole code is needed)
void cis_32(){
int midterm_grade,midterm,final_exam;
static int studnet_ID;
static int a[10][4];
bool valid=false;
static int i;
i++;
do{
printf("\n\n\tPlease Enter the student ID\n");
cin>>student_ID;
if (!( student_ID >=1 && student_ID <= 100)) {
cout<<" Please inter a number between 1 and 100";
valid=false;
}
else
valid=true;
}while(valid==false);
if (i>1){
do{
for (int counter=0;counter<=i-1; counter++){
if (a[i-1][0]==student_ID ){
valid=false;
cout<<"Duplicate id , try again";
}
else
valid =true;
}
}while(valid==false);
i would be counted as the effective size of my array and it will check if there is any given a[i-1][0]=student_ID, in other words, I'm searching trough my a[i-1][0]
I hope I have answered your question.....
and after checking the a[i-1][0] for a duplicate I will set it equal to the student id