Hello again guys!
i have a simple question how to promt user to enter a number for example 444 or whatever and for c to print it as a 9 digit number, so if its 444 c would print it as 000000444?

any help would be greatly appriciated.,


Do you want to do it just so you could justify it to the right? If so you could use this:

int i=444;

It won't include any zeroes at the beginning but it'll be right justified.

int n = 444;
printf("%09d", n);

More examples here.

commented: %09d- ofcourse! *whacks self* +1

Thanx a lot guys!