Question: Below is my code and i am getting bunch of errors, pls help me fixing the errors #include #include int main() { int m =
Below is my code and i am getting bunch of errors, pls help me fixing the errors
#include #include
int main() { int m = 0, i = 0, sum =0;
char *input = getenv("QUERY_STRING"); sscanf(input, "numberofterms=%d", &m); printf("Content-type: text/html ");
for(int i = 1; i
printf("The sum is = %d", sum);
return 0; }

prob3.c: In function 'main' prob3.c:9: error: redefinition of 1' prob3.c:5: error: previous definition of i' was here prob3.c:9: error: 'for' loop initial declaration used outside C99 mode prob3.c:11: error: sum, undeclared (first use in this function) prob3.c:11: error: (Each undeclared identifier is reported only once prob3.c:11: error: for each function it appears in.) [sn@omega.uta.edu]:/home/r/rx/rxa8124/public_html: nl prob3.c 1 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
