![]() |
|
#1
|
|||
|
|||
C program for temperature calculationhi i am new here please forgive me if i have violate any rules and let me know of my mistake in order to rectify it .
OK first of all i am trying to make simple program in c for converting temp from Fahrenheit to Celsius and vice versa but cant figure out my mistakes please help i am a newbie in programming so please explain so that i can understand. here is the program i wrote CPP / C++ / C Code:
Last edited by admin : 05-Aug-2008 at 21:12.
Reason: Please insert your example C/C++ codes between [CPP] and [/CPP] tags
|
|||
|
#2
|
|||
|
|||
Re: c program for temp calculationAre you getting warnings or errors when you compile? If not learn to set them to maximum. on your compiler. They will help you.
Will the program run? Post us the ouptuts so we can see what you see! ...and give a s good a description of problem as you can. Enclose output using the 'code' tag icon thingy in the posting input window. Here some starter suggestions: CPP / C++ / C Code:
Last edited by Howard_L : 05-Aug-2008 at 13:09.
|
|
#3
|
|||
|
|||
Re: C program for temperature calculationwhile i am compiling i am getting the error
Code:
|
|
#4
|
|||
|
|||
Re: C program for temperature calculationplease explain clearly cant understand or if possible give the corrected code
|
|
#5
|
|||
|
|||
Re: C program for temperature calculationQuote:
Quote:
So, here goes: The compiler was looking for a closing '}' brace when it reached the end of the file. The compiler is also telling you that the block that wasn't closed started somewhere around line 5. You could, maybe, see it more clearly if you indent your code to emphasize the structure. The compiler ignores indentation, but us mere humans can benefit by adapting some kind of style. Look at examples in books or in examples on the web. Here's your code indented according to my personal preference style. CPP / C++ / C Code:
What's missing? The closing '}' at the end. I am curious about why "Fahrenheit" is spelled correctly in the problem statement, but is consistently misspelled in the code that you wrote? Also why did you downgrade the preferred term "Celsius" to the old-fashioned, unofficial, designation "centigrade" in the code? Oh, well... Quote:
Regards, Dave Footnote: No one was born knowing this stuff, you know... ---davekw7x |
|
#6
|
|||
|
|||
Re: C program for temperature calculationthank you dave for such quick response
|
|
#7
|
|||
|
|||
Re: C program for temperature calculationfor my spelling mistake i am sorry as because it is not my mother language i am a bit weak in it the spelling is correct in the post because of the automated spelling check process.
|
|
#8
|
|||
|
|||
Re: C program for temperature calculationi am just a beginner in c language and also don`t much about it .
i have learned till now some basic functions in the c language. |
|
#9
|
|||
|
|||
Re: C program for temperature calculationso dave can you suggest me a better way for my program .
also can you suggest me some examples which can be easily understandable for a beginner. so that i can learn the language fast and easy and effective way. |
|
#10
|
|||
|
|||
Re: C program for temperature calculationby the way i am very much thankful for quick and generous response.
|
Recent GIDBlog
Configuring iptables for Webmin Servers Index Module by gidnetwork
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Equation solver | RazoR | C Programming Language | 3 | 18-May-2008 09:24 |
| Two-Tier data dissemination code installation problem | nidhibansal1984 | Computer Software Forum - Linux | 6 | 16-Sep-2007 10:13 |
| Help with a complex program | lordfuoco | C++ Forum | 5 | 24-Jun-2006 06:03 |
| Grades Calculation Program | UnWarierMage | C++ Forum | 11 | 19-Jun-2006 15:24 |
Network Sites: GIDNetwork · GIDApp · GIDSearch · Learning Journal by J de Silva, The