Hi all!
Brand new to C Programming. I'm working on a little sample program presented at 'Howstuffworks.com' - the c programming section, and I have to add a header to a table as one of the challenges. I've tried everything I can think of but no go, including searching the forums here. I did find a few tips but I suspect the problem is that I'm not inserting the code correctly. Below is the simple little program. It converts degrees to celsius. What I want to do is put a header at the top of the table/column. Where would that go in the code? I'm thinking it's an extra printf line above the one that prints the column, but nothing I'm trying is outputting correctly. Many thanks in advance!
Code:
#include <stdio.h>
int main()
{
int a;
a = 0;
while (a <= 100)
{
printf("%4d degrees F = %4d degrees C\n",
a, (a - 32) * 5 / 9);
a = a + 10;
}
return 0;
}