Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Other Topics > Computer Technical Help
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-21-2007, 08:15 AM
jk1986 jk1986 is offline
Senior Member
 
Join Date: Aug 2006
Location: London
Posts: 775
Default basic c programming annoying error

Hi, I'm starting to learn c from a textbook so that I can get on with a uni module in it that starts in a few weeks.
I've been working through the book for a few hours now, and I came across this example. I can't compile it, even though its an exact copy of teh example in the text book. Get an error, line 10: warning:new line not last character in file.

I know that this is a really really basic mistake, but please point out what it is!

#include <stdio.h>

/* print Fahrenheit-Celcius table*/
main()
{
int fahr;

for (fahr = 0; fahr <=300; fahr = fahr + 20)
printf("%3d %6.1f \n", fahr, (5.0/9.0)*(fahr-32));
}


thanks in advance - also the forum is removing all the tabs, but the program itself is indented.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.