67 079
Assignments Done
99,3%
Successfully Done
In November 2018

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] == '-')
continue;
printf("%c",pin[i]); /*output numbers on display*/
/*its also can be written in array*/

}
printf("
");
system("pause");
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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions