Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void IDName(int a)
- {
- int Flag = 0, counter = 0, i, max = 0;
- char ID;
- while (Flag == 0)
- {
- fflush(stdin);
- if (a == ID_1)
- {
- max = 9;
- printf("Please Insert your ID(your ID must be consisting of 9 numbers between 0-9\n");
- }
- else if (a == INDEX_1)
- {
- max = 4;
- printf("Please Insert your Last 4 Credit Card digits(The Number must be consisting of 4 numbers between 0-9\n");
- }
- ID = getchar();
- fflush(stdin);
- for (i = 0; i < max; i++)
- {
- if (ID >= '0' && ID <= '9')
- {
- ID = getchar();
- fflush(stdin);
- }
- else counter++;
- }
- if (counter == 0) Flag = 1;
- else counter = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement