现在的位置: 首页 > 综合 > 正文

sscanf(getenv(“QUERY_STRING”),”i=%d&j=%d”,&i,&j);

2013年10月06日 ⁄ 综合 ⁄ 共 276字 ⁄ 字号 评论关闭
#include "stdafx.h"
#include "stdlib.h"
#include <windows.h>
#include <windowsx.h>

int main(int argc, char* argv[])
{
	printf("Content-type: text/html\n\n");

    int i,j;
	sscanf(getenv("QUERY_STRING"),"i=%d&j=%d",&i,&j);

	printf("<html>\n<body>\n <br> \
		  %d+%d=%d\n \
		  <br> \
		</body></html>",i,j,i+j);
	return 0;
}

抱歉!评论已关闭.