76 836
Assignments Done
Successfully Done
In June 2019

Answer to Question #38216 in C++ for mae salen

Question #38216
A C++ that will aceept 8 digit PIN number with dash every after 2 digits.The program must remove all dashes.
Expert's answer
#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] == '-')
printf("%c",pin[i]); /*output numbers on display*/
/*its also can be written in array*/

return 0;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions