Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Jul 2017 |
Last Sign in: | 270 Weeks Ago, 6 Days Ago |
Questions Answered: | 1850 |
Tutorials Posted: | 1850 |
Graduate in Biology and Nutrition, MBA Finance
Florida State University
Aug-2000 - Jul-2007
Ass. Relationship Manager
Penn-Florida
Mar-2009 - Feb-2016
bool isNumeric(string SSN);
//use ASCII to determines if a string contains only the characters 0-9
void displayFormattedNumber(string SSN);
//Calls the formatSSN function and then displays it to the console
//With the message "You entered: " followed by the SSN
string formatSSN(string SSN);
//helper function to displayFormatted SSN
//converts a 9 character string into an SSN in the format XXX-XX-XXXX
Â
Please enter a 9-digit SSN (no spaces no punctuation): 12345
You entered too few digits. Please try again.
Â
Please enter a 9-digit SSN (no spaces no punctuation): 123456789012345
You entered too many digits. Please try again.
Â
Please enter a 9-digit SSN (no spaces no punctuation): 123 456
You entered too few digits. Please try again.
Â
Please enter a 9-digit SSN (no spaces no punctuation): 123 456 7890
Please enter a number with no spaces or punctuation. Please try again.
Â
Please enter a 9-digit SSN (no spaces no punctuation): 123-45-6789
Please enter a number with no spaces or punctuation. Please try again.
Â
Please enter a 9-digit SSN (no spaces no punctuation): 123456789
You entered: 123-45-6789
Â
bool not_valid_SSN = true;
do {
    //user input
    if (test for too short) {
       //display appropriate error message
    } else if (!is_numeric(SSN)) {
       //display error message
    } else if(test for too long) {
       //display appropriate error message
    } else {
       //display appropriate formatted phone number
       not_valid_SSN = false;
    }
} while(not_valid_SSN);
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I