Question: For this task, please submit only the twoDigitString function, whose shell is as follows: / * * * Formats a number as 2 digits, with
For this task, please submit only the twoDigitString function, whose shell is as follows:
Formats a number as digits, with a leading if needed
@param n number to format, assumed between and inclusive
@return two digit string representation of number
string twoDigitStringunsigned int n
To implement this method, you should:
Check if the number is between and If it is tack a onto the front of the string representation of the number.
Convert the number to a string using your programming language's builtin functions.
Return the resulting string.
Remember that the resulting string should always be digits long. So if the input number is the output should be
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
