B
babyip
hello, i have a problem using printf() function, would u please help me?
i have a program to print numbers on screen, each number occupies five
spaces and the range of the number is from -9 to 9.
my question is, how can i place the number in the middle of the five spaces?
thanks!
here is my example (allow me to use underline "_" to represent space " ")
"__1__" <==positive number at the third position
"__-4_" <==the negative symbol at the third position, and the number at
the fourth position
i have a program to print numbers on screen, each number occupies five
spaces and the range of the number is from -9 to 9.
my question is, how can i place the number in the middle of the five spaces?
thanks!
here is my example (allow me to use underline "_" to represent space " ")
"__1__" <==positive number at the third position
"__-4_" <==the negative symbol at the third position, and the number at
the fourth position