If it matches the program should report success and end


Write a program that allows the user to verify entry of a 4-digit personal identification number (PIN). The program should use character graphics and capabilities provided by the ncurses library. The program should clear the screen and display a prompt to enter a 4-digit PIN. As the user types a digit, an X should be displayed to represent each digit. Only the characters 0 through 9 should be accepted, any others should be ignored. If the user presses the backspace key, then the last digit entered should be deleted and the display updated to reflect the deletion. When the user presses [ENTER], the system should compare what has been entered (may be 0 to 4 digits) against the value 5309. If it matches, the program should report success and end; otherwise the program should report that the code entered is incorrect, and then start over from the beginning.

Solution Preview :

Prepared by a verified Expert
Computer Graphics: If it matches the program should report success and end
Reference No:- TGS0669457

Now Priced at $40 (50% Discount)

Recommended (95%)

Rated (4.7/5)