摘要:
#include "glib.h"int N=14; /*递归次数*/double sx=220.0,sy=280.0; /*开始点坐标*/double leng0=200.0; /*开始点与结束点的距离*/double a,b,t=0.5;void fractal(double x0,double y0,double x1,double y1) /*分形图形描画函数*/{ double px,py; if ((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0)>=2.0) {px=x0+(a*(x1-x0)-b*(y1-y0));py=y0+(b*(x1- 阅读全文
摘要:
#include "glib.h"int N=12; /*递归次数*/double sx=120.0,sy=240.0; /*开始点坐标*/double leng0=400.0; /*开始点与结束点的距离*/double a,b,t=0.57735;void fractal(double x0,double y0,double x1,double y1,int n) /*分形图形描画函数*/{ double px,py; if (n<=N) {px=x0+(a*(x1-x0)-b*pow(-1.0,(double)n-1)*(y1-y0));py=y0+(b*pow( 阅读全文
摘要:
#include "glib.h"int N=14; /*递归次数*/double sx=220.0,sy=280.0; /*开始点坐标*/double leng0=200.0; /*开始点与结束点的距离*/double a,b,t=0.5;void fractal(double x0,double y0,double x1,double y1,int n) /*分形图形描画函数*/{ double px,py; if (n<=N) {px=x0+(a*(x1-x0)-b*(y1-y0));py=y0+(b*(x1-x0)+a*(y1-y0));putpixel(px 阅读全文
摘要:
#include <graphics.h>#include <conio.h>#include <dos.h>#include <math.h>#include <process.h>#include <stdio.h>#define PI M_PI#define END 2011.2void ginit(){ int driver=DETECT,mode,err; initgraph(&driver,&mode,"D:\\TC\\BGI"); /*if (grOK!=(err=grap 阅读全文
摘要:
PIVOT用于将列值旋转为列名(即行转列),在SQL Server 2000可以用聚合函数配合CASE语句实现
PIVOT的一般语法是:PIVOT(聚合函数(列) FOR 列 in (…) )AS P 阅读全文