Add both header for the entire table, and individual headers denoting which column is which unit.
This commit is contained in:
parent
67483eaceb
commit
357347ae6e
2 changed files with 6 additions and 1 deletions
BIN
KNR C/a.out
BIN
KNR C/a.out
Binary file not shown.
|
|
@ -13,10 +13,15 @@ int main()
|
|||
step = 20; /* step size between calculated conversions*/
|
||||
|
||||
fahr = lower;
|
||||
|
||||
|
||||
printf("Temperature conversion table with 20-degree^f steps. \n");
|
||||
printf("%4s\t%6s\n", "DegF", "DegC");
|
||||
|
||||
while (fahr <= upper)
|
||||
{
|
||||
celsius = (5.0/9.0) * (fahr-32);
|
||||
printf("%3.0f\t%6.1f\n", fahr, celsius);
|
||||
printf("%4.0f\t%6.1f\n", fahr, celsius);
|
||||
fahr = fahr + step;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue