Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Structure Of The Relational Database Model

Authors: Jan Paredaens ,Paul De Bra ,Marc Gyssens ,Dirk Van Gucht

1st Edition

3642699588, 978-3642699580

More Books

Students also viewed these Databases questions