big problem with C today. So I want my variables to align in columns and be 2 decimal places at the same time.
I know to get to 2 decimal places I need to use %.2f and i
Try this:
printf("ItemA\t\t%30.2f @ $3.34 \t\t$ %30.2f\n", huhu, totalhuhu);
printf("ItemB\t\t%30.2f @ $44.50\t\t$ %30.2f\n", haha, totalhaha);
The \t are tabs to keep similar spacing. You can add as many as you want until you like it and %30.2f will give you a width of 30 before the decimal and a width of 2 after. This should give you your desired results for spacing.