help please i have errors and dont know how to fix them new at this
so im new to the c programming thing but im starting to find it quite intesting so i am trying to make a program that converts mph to fps but i keep getting errors can anyone help me heres the program
Code:
#include <stdio.h>
#include <math.h>
int main()
{
int mph =0
double fps, increment
printf("please input increment between 0-80 mph \n");
scanf("%lf", &increment);
mph=mph + increment
while mph <=80
fps=mph*5280/3600
printf("%5.0f %5.1f" \n, mph, fps);
}
i get errors on lines 12 saying that i have a syntax error before double
line 14 says increment is undeclared (first use this function)then on 14 again sainf that each undeclared identifier is reported only once for each function it appearsin.) and lie 17 says syntax error before "mph"
this is the current update with you all's help
this is the code up date
Code:
#include <stdio.h>
#include <math.h>
int main()
{
int mph =0
double fps, increment
printf("please input increment between 0-80 mph \n");
scanf("%lf", &increment);
mph += increment;
for ( mph <= 80; mph += increment );
{
fps=mph*5280/3600
printf("%5.0f %5.1f \n", mph, fps);
}
Errors:
in function main
12 syntax error before "double"
14 "increment" undeclared (first use in this function)
14 (Each undeclared identifier is reported only once for each function it appears in.)
17 syntax error before ")" token
19 "fps" undeclared (first use in this Function)
22 syntax error at end of input