Homework Help, simple program, unsure newbie :(
Hi everyone. I read all the "before you post, know this" stuff, so I hope I get it right!
First, this is a homework that I have been stuck on for a month. I have a serious mental block when it comes to programming for some reason I did numerous Goggle searches but found nothing. I found a similar program on here, but I didn't want to copy theirs, for obvious reason. I would really like to learn how to program in C. Plus, the one that is posted was really buggy.
The instructions are as followed;
"HW2 computes a list of conversions from miles per hour to feet per second. The list should be from 0 to 80 mph with an increment the user inputs. After the prompt 'input increment:' is given, your program should display the answer on the screen. Output should be %5.0f %5.1f."
Second, I wrote a program is a fine program in itself, it converts mph to fps very nicely. BUT it is incorrect because it does not do it in "user inputted increments." I didn't do what was asked, and I have been avoiding this program ever since.
This is where I am stuck! I don't even know where to start with the increments.
I know I need to have the user input an increment from 0 to 80, then the program should print out a list of conversions in the specific increment.
Should I use "increment" as declared variable? Then use it in some sort of equation that the program executes when the user assigns "increment" a value?
I just need a push in the right direction I think.
I will include the original program, forgive me if the code tags suck, I am very new at all of this.
Any input from the experts would be greatly appreciated! (I would go to my professors office hours, but it is a holiday and he is currently out of town)
#define SCALE_FACTOR (1.46666667f)
float mph, fps;
printf("Enter mph: ");
fps = mph * SCALE_FACTOR;
printf("Feet per second equivalent: %5.1f\n", fps);