program which allows the user to type a social security number in xxx-yy-zzzz format, reads it into a string object, converts the string object into its numeric equivalent integer representation via an int object and then displays the result.
$12-17 USD
Completed
Posted over 22 years ago
$12-17 USD
Paid on delivery
Your program need not worry about improper input, if it crashes or behaves oddly due to bad input that's ok, for now. Your program must use the getline function to read the user's input. Your program must parse (break up) the input string into three substrings representing xxx, yy, and zzzz respectively. Your program must then convert each of these substrings into their equivalent integer forms. You may not use any library or member functions that do these conversions for you. You may find the fact that given any character digit d in the range of 0 to 9, then d - '0' is its integer equivalent. Also given any string str and integer ind, in the range of 0 to [login to view URL]() - 1, then str[ind] is the character, within the string, at location ind. Example: Given string str = "Hello"; then str[1] is e. Your program must then use the three integer values from the previous step to construct the final integer version of the social security number. At each step along the way your program must produce reasonably formatted output, displaying the results of that step (see sample output for clues as to what is reasonable). Sample Run(s): [login to view URL]: [login to view URL] Please enter social security number xxx-xx-xxxx : 123-45-6789 The original input string is String version = 123-45-678 The three extracted substrings are ------------------------------------- Substring one = 123 Substring two = 45 Substring three = 6789 ------------------------------------- The three converted integer values are -------------------------------------- Integer value one = 123 Integer value two = 45 Integer value three = 6789 -------------------------------------- The final converted integer is -------------------------------------- Integer version = 123456789 --------------------------------------
## Deliverables
Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased.
## Platform
unix
## Deadline information
must have by monday morning. 8:00 am central time. i fell behind. didn't have to do over [login to view URL]