I've decided to start up this here thread in regards to programming, software design, the whole shibang.
Recently, I decided to dust off my old C programming textbook and get the old programming skills running again. Now, for the record, I've completed my courses at my university and I'm getting my degree next week. However, my programming skills have been dropping the past couple years and I want to get back on track when it comes time to get a good job in my programming profession. That said, I've recently decided to go back to university for one more year to take a few extra credit courses in order to fulfill the requirements for a 4 year bachelors in Business Computing (the degree I'm getting next week is a 3 year bachelors in Business Computing). Since I've already completed all my computing courses, all I can take is a couple of history and literature ones for the time being until I've got all my credits for a 4 year degree. My goal is to have my programming skills sharpened by next spring so I can be ready to tackle the work force full time.
That said, I'm going to run into a few problems with my programs every now and then such as a function that just won't work for some reason, a stubborn loop, or incorrect data. That's where I will ask you guys for advice. If you can point out some things wrong in my programs, I would like to hear it. Now, for the record, I
don't expect anyone here to write the programs for me. That is supposed to be my job and I need the experience. All I'm saying is that if I come to a major snag that is beyond my comprehension, I would like a little help.
Finishing university is one thing, but getting a major job in my profession is a whole different ball game. If I'm gonna go into the work force, I wanna go prepared.
So, with that said, let's get down to business. I have a little program that I was working on in C today that is none other than the familiar "Fahrenheit to Celsius" conversion. Now, for the record, the program works. The problem I have with it is that I'm not sure if the output is correct. The output
seems correct but there was a stipulation in the textbook question saying that the celsius values need to be rounded to the nearest integer. Oh, and by the way, the values
have to be displayed as integers. Here is the output:
CELSIUS FAHRENHEIT
-----------------------
-6 20
-3 25
-1 30
1 35
4 40
7 45
10 50
12 55
15 60
18 65
21 70
23 75
26 80
29 85
32 90
35 95
37 100
The Fahrenheit values are correct as the question asked me to record the values in five degree intervals. It is the Celsius values that worry me. For the hell of it, I converted my "int" values into "float" to test to see if they were more accurate and sure enough, they were. It's just these integer values that leave me inconclusive. This is why I need a second opinion on the matter. Are these Celsius values accurate as an integer definition or are a few of the values not rounded properly?
I'm heading to bed now so I won't be back till tomorrow morning to check what you guys have said.
Any help is appreciated! Thanks.