A C++ that will aceept 8 digit PIN number with dash every after 2 digits.The program must remove all dashes.
1
Expert's answer
2014-01-09T09:41:01-0500
#include #include int main() /* main function*/ { char pin[11]; //size of pin-number with dashes printf("Enter pin-number xx-xx-xx-xx: "); scanf("%s",pin); //read pin-number from user printf("pin-number without dash: "); for(int i=0; i<=10; i++) { if ( pin[i] == '-') continue; printf("%c",pin[i]); /*output numbers on display*/ /*its also can be written in array*/
Comments
Leave a comment