#include <iostream>
#include <string>
using namespace std;

// The program is called from the prog1.html page
// It will output the larger of the two integers
// that are entered

int main( int argc, char *argv[], char *envp[] )
{
        // Output the required two lines of content info
    cout << "Content-type: text/html\n\n";

        // Output the result
    cout << "COMMAND LINE ARGS<BR>" << endl;
    cout << "argc=" << argc << endl;
    for( int i = 1; i < argc; i++ )
        cout << argv[ i ] << endl;

    cout << "<BR>" << endl;
    cout << "\nENVIRONMENT<BR>" << endl;
    for( int j = 0; envp[j] != NULL; j++ )
        cout << envp[ j ] << endl;

    cout << "<BR>" << endl;
    cout << "\nStandard Input<BR>" << endl;
    string oneLine;
    while( getline( cin, oneLine ) )
        cout << oneLine << endl;

        // Output a little friendly info
    cout << "<br>\n";
    cout << "Hit right mouse button to go back.\n";
}
 

