Update main.c

main
po79yr3at 1 year ago
parent c9551f4567
commit ed1ce4142c

@ -69,18 +69,18 @@ void Info_Remove()
} }
if(tp){ if(tp){
printf("Found:%d\n", tp); printf("Found:%d\n", tp);
Range(info){ Range(info)
ord++;
if(psf->id == num) if(psf->id == num)
info_format_print(p); info_format_print(p);
}
if(tp != 1) if(tp != 1){
printf("Please type in the number of data that you want to remove\n");
scanf("%d", &num); scanf("%d", &num);
else num = 1; }else num = 1;
if(num > 0 && num < tp){ if(num > 0 && num <= tp){
printf("Make Sure To Remove?[yes/no]"); printf("Make Sure To Remove?[yes/no]");
if(make_sure()){ if(make_sure()){
Array_deletepos(&info, stk[num-1]); Array_deletepos(&info, stk[num-1]-1);
printf("Remove Done\n"); printf("Remove Done\n");
}else printf("Canceling the option\n"); }else printf("Canceling the option\n");
}else printf("illegal input of the Index\n"); }else printf("illegal input of the Index\n");
@ -105,11 +105,9 @@ void Info_Quiry()
} }
if(tp){ if(tp){
printf("Found:%d\n", tp); printf("Found:%d\n", tp);
Range(info){ Range(info)
ord++;
if(psf->id == num) if(psf->id == num)
info_format_print(p); info_format_print(p);
}
}else printf("Student [id:%d] Not Found\n", num); }else printf("Student [id:%d] Not Found\n", num);
} }
int Info_sortById_a(void *a, void *b){ int Info_sortById_a(void *a, void *b){

Loading…
Cancel
Save