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; }

Below is my code and i am getting bunch of errors, pls

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 #include 3 int main() 5 int m 0,i-0, sum0; getenv("QUERY-STRING" ); "numbe rotterms-%d", 6 char *input = 7 sscanf(input, &m ) ; 8 printf("Content-type: text/html "); 9 for(int i=1; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!