Write a version of itoa that accepts three arguments instead of two. The third argument is a minimum field width; the converted number must be padded with blanks on the left if necessary to make it wide enough.
Each input line holds an integer n, which fits in an int, and a width w from 0 to 100, separated by a blank. Print the string itoa(n,s,w) makes on a line of its own. A minus sign counts towards the width.
No submissions yet