Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pls help me with the CGI code 3. (1) Prepare an HTML file, prob3.html, with the following content: This program computes 1 + 2+ 3+

Pls help me with the CGI code

image text in transcribed

3. (1) Prepare an HTML file, prob3.html, with the following content: This program computes 1 + 2+ 3+ + n where n is entered from the browser
fp> Enter n:

Enter m:

Enter n:

#include #include int main() float m,n; /* The variable input takes parameters passed by HTML * char *input - getenv("QUERY_STRING" ); /* We now separate m and n from one long string of "input"* sscanf(input, "number1=&E&number2-%f", &m, &n); /* CGI script must spit the following string no matter what ! */ printf("Content-type: text/html "); /*Any printf command hereafter is output to the web browser. */ printf ("The sum is %f" ,m+n); return 0

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

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions

Question

Discuss different external sources of HR data.

Answered: 1 week ago