Question: Please solve in C program this is what i have so far #include #include int main(void){ } char input[5] int i, all_digits; do{ printf(Type the

Please solve in C program

this is what i have so far

#include #include

int main(void){ } char input[5] int i, all_digits;

do{ printf("Type the last four digits of your card number"); scanf("%s",input);

all_digits=1; for (I=0; input[1]; i++) { if (!isdigit(input[I])) { all_digits = 0; break; } } if (all_digits){ if (input[0] == '1' && input [1] == '2' && input[3] == '5'){ printf("Authenticated Successfully! "); break; } else { printf("The Four Digits Do Not Match! Do You Want to Try Again? (y/n)"); char response; if (response != 'y'){ printf("Authentication Failed! "); break; } } } else { printf("Invalid Input! Do You Want to Try Again? (y/n)"); char response; scanf("%c", &response); if (response != "y"){ printf("Authentication Unsuccessful! "); break; } } while (1); return 0;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!