The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 398 Weeks Ago, 1 Day Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
The following checksum formula is widely used by banks and credit card companies to validate legal account numbers:
Â
![]()
The di are the decimal digits of the account number and f(d) is the sum of the decimal digits of 2d (for example,/(7) = 5 because 2X7 = 14 and 1+ 4 = 5). For example 17327 is valid because 1+5+3+4+7=20, which is a multiple of 10.Imple men t the function/and write a program to take a 10-digit integer as a command line argument and print a valid 11-digit number with the given integer as its first 10digits and the checksum as the last digit.
Â
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll