I would like to output my data in columns with headers.
I looked at some printf escape sequences, but haven't found anything to satisfy me.Is there any way to ensure the data lines up with the headers?
printf("Enter value for R1(ohms): ");
printf("\nEnter value for R2(ohms): ");
printf("\nEnter value for C(uF): ");
f = 1/(.693*(r1+(2*r2))*c); /* freq(hz) = 1/ .693*(r1+(2*r2))*c */
period = 1/f;
t1 = .693*(r1+r2)*c;
t2 = .693*r2*c;
duty = (t1/period)*100;
printf("\nFreq Period T1 T2 Duty Cycle");
printf("\n%fHz fsec% %f %f %f\%%", f, period,t1,t2,duty);