Hi I have a assignment about formatting C
this is the assignment
print_patterns(int i, double d) - Print 10 lines as specified below.
* Lines 1 and 2 are fixed patterns with 20 characters each.
* Line 3-6 are for integer i (sample value 123).
* Line 7-10 are for double d (sample value 456.789).
*
* LINE# DISPLAYED PATTERN COMMENTS
* 1 12345678901234567890 fixed pattern
* 2 -------------------- fixed pattern
* 3 123 ends at the 10th position
* 4 123 starts from the 11th position
* 5 00000000000000000123 flushes to the right, with padding
* 6 123 123 two occurrences, flush to both ends
* 7 456.789 flushes to the right, no padding
* 8 0000000000000456.789 flushes to the right, with padding
* 9 0000000456.789000000 decimal point at 11th position, with padding
* 10 00456.78900 decimal point at 11th position, pads to 5 digits
* before and after decimal point
so far I got them to line 7, but I have no idea how to do 8,9,10 any one can help ?