|
|
@ -66,7 +66,7 @@ void ageInput() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if((checkIfInteger(userInput)) && !(agePermission(age))) |
|
|
|
else if((checkIfInteger(userInput)) && !(agePermission(age))) |
|
|
|
{ |
|
|
|
errorMessage(-5); |
|
|
|
break; |
|
|
@ -80,8 +80,8 @@ void ageInput() |
|
|
|
scanf("%s",userInput); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -90,16 +90,16 @@ void menuInput() |
|
|
|
char choiceInput[20]; |
|
|
|
char* choiceInputPointer; |
|
|
|
int selection, input, ctr = 0; |
|
|
|
|
|
|
|
|
|
|
|
while((input=getchar())!='\n'){ |
|
|
|
choiceInput[ctr] = input; |
|
|
|
++ctr; |
|
|
|
} |
|
|
|
choiceInput[ctr] = '\0'; |
|
|
|
|
|
|
|
selection = strtol(choiceInput, &choiceInputPointer, 10); |
|
|
|
|
|
|
|
while (!checkIfInteger(choiceInput) || !chooseOption(selection)) |
|
|
|
selection = strtol(choiceInput, &choiceInputPointer, 10); |
|
|
|
|
|
|
|
while (!checkIfInteger(choiceInput) || !chooseOption(selection)) |
|
|
|
{ |
|
|
|
printf("Input invalid! try again!\n"); |
|
|
|
ctr = 0; |
|
|
@ -110,7 +110,7 @@ void menuInput() |
|
|
|
choiceInput[ctr] = '\0'; |
|
|
|
selection = strtol(choiceInput, &choiceInputPointer, 10); |
|
|
|
} |
|
|
|
switch(selection) |
|
|
|
switch(selection) |
|
|
|
{ |
|
|
|
case 1 : collectCustomerDataForLogin(0); |
|
|
|
break; |
|
|
@ -121,16 +121,16 @@ void menuInput() |
|
|
|
case 3 : getEmployeeAccessCode(); |
|
|
|
break; |
|
|
|
|
|
|
|
case 4 : getNewEmployeeCredentials(); |
|
|
|
case 4 : getNewEmployeeCredentials(); |
|
|
|
break; |
|
|
|
|
|
|
|
case 5 : displayMenuCalculator('c'); |
|
|
|
break; |
|
|
|
|
|
|
|
case 6 : printf("\e[1;1H\e[2J"); |
|
|
|
printf("\nsee you next time !\n\n"); |
|
|
|
|
|
|
|
case 6 : printf("\e[1;1H\e[2J"); |
|
|
|
printf("\nsee you next time !\n\n"); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -139,12 +139,12 @@ void showMenu() |
|
|
|
|
|
|
|
printf("\t\t\t\t\t\t\t Welcome to Bank Manager!"); |
|
|
|
printf("\n\n\n\n\t\t\t\t\t\tPlease select one of the following functions!"); |
|
|
|
printf("\n\n\n\n\t\t\t\t\t\t ->Login as an existing costumer."); |
|
|
|
printf("\n\n\t\t\t\t\t\t ->Register as a new costumer."); |
|
|
|
printf("\n\n\t\t\t\t\t\t ->Login as an Employee."); |
|
|
|
printf("\n\n\t\t\t\t\t\t ->Register as an Employee."); |
|
|
|
printf("\n\n\t\t\t\t\t\t ->Calculator"); |
|
|
|
printf("\n\n\t\t\t\t\t\t\t\t ->Exit.\n"); |
|
|
|
printf("\n\n\n\n\t\t\t\t\t\t 1->Login as an existing costumer."); |
|
|
|
printf("\n\n\t\t\t\t\t\t 2->Register as a new costumer."); |
|
|
|
printf("\n\n\t\t\t\t\t\t 3->Login as an Employee."); |
|
|
|
printf("\n\n\t\t\t\t\t\t 4->Register as an Employee."); |
|
|
|
printf("\n\n\t\t\t\t\t\t 5->Calculator"); |
|
|
|
printf("\n\n\t\t\t\t\t\t\t\t 6->Exit.\n"); |
|
|
|
printf("\n\n\n\n\n Selection :\n"); |
|
|
|
|
|
|
|
} |
|
|
|