aligning decimal points?
Im new to c programing and am in a class to learn.
our first project we have to create a program that allows a user to input their time worked hours pays and a deduction and then have the program display all their taxes and gross / net pay.
that much I have done but for full credit we must make all the decimal points line up. what would be the best way to do this?
Use the format specifiers for printf(). In particular the field width and resolution specifications:
Makes a fleld 10 digits wide (the dot counts as 1 width), and displays your floating point number to 2 decimal places. You can change the position of the numbers inside the field width, by using the - before the field width specifier: %-10.2f etc.
yeah adak was right
u can doing this on int and other declaring variables too