#include 
#include 
#include "./cgi.h"

cgi_main(cgi_info *ci)
 { 
  int ad,bd,rd,c;
  form_entry *params = NULL;
  params = get_form_entries(ci);

  print_mimeheader("text/html");
  if (params != NULL)
       { ad = atoi(parmval(params,"a"));
         bd = atoi(parmval(params,"b"));
	 rd = atoi(parmval(params,"round"));
         c = ((ad * bd)/rd) * rd;
	 cout << "" << parmval(params,"a") <<
                 " times " << parmval(params,"b") << " = " << c <<
	         "";
         return 1;}
  else { cout << " Please type in the two numbers which " <<
		 "you want to multiply.

" << "

" << "

" << "Round down to

" << "

"; return 1;} }