1. Originally Posted by RockyMarrone
hey victory1
Why u stuck with for plz can u tell me that First

fOR for loop() here in the code just replace

while (start_temprature <= end_temprature) {
with

for (float temprature = start_temprature; temprature <= end_temprature; temprature+=5) {
I'm just trying to finish my associates degree in programming. I'm a little bit older with two young children who require my attention all the time so I don't have hours to research and read my C programming book. I'm not looking for and easy out for this class, I love programming I just am having a hard time understanding the FOR statement that I have to use for this assigenment. The assignement that I have to do reads as follows.

Write a C program that converts Fahrenheit to Celsius temp. in increments of 5 degrees. The initial value of the Fahrenheittemp. and the total conversions to be made are to be requested as user input during program execution.

I really don't see the light when it comes to using the FOR statement but that is what my teacher requires me to use. I can think of different ways to do this program that would run just fine to but that is not what the teacher wants. Like I said I'm older and I took classes 10+ years ago like cobol, fortan DOS and advance DOS which I got all A and B's in these classes so I'm just a bit rusty at this.

2. You have my sympathy, but you'll have to step it up - regardless. For loops are a very basic loop in C, used all the time, (in every language I've seen), and not hard to understand.

Your assignment requires you to ask the user for the starting and ending temperature. That must be done before any for loop can start.

(these will both be in Fahrenheit)

The you need your for loop:

Something like:
Code:
```for(i = startTemp; i <= stopTemp; i+=5) {
c = (i * 5)/9 - 32
printf() //print out "i = c", i, c
}```
Your results will not be completely accurate, because integer division drops the fractional part of any division. If you need greater accuracy (to less than 1 degree), then you'll need to make all your variables floats or doubles.