随笔分类 -  小程序

给力小程序
摘要:1、输出菱形1 #include <stdio.h> 2 void main() 3 { 4 int i;5 for(i=0;i<19;i++)6 printf("%*s\n",i<10?11+i:29-i,"********************"+(i<10?19-2*i:2*i-17)); 7 } 2#include <stdio.h>int p(int i, int N) { return printf("%d ", i) && (N>i) && 阅读全文

posted @ 2013-05-06 13:25 jjtx 阅读(421) 评论(0) 推荐(0)

MandelbrotSet 分形艺术(C++实现)
摘要:转自 EasyX,不过我重构了代码。运行结果:源程序: 1 // MandelbrotSet.cpp 2 3 #include "graphics.h" 4 #include <conio.h> 5 6 struct Complex 7 { 8 double re; 9 double im;10 11 public:12 Complex operator * (const Complex &other) const13 {14 Complex c;15 c.re = this->re * other.re - this->i... 阅读全文

posted @ 2012-12-29 23:58 jjtx 阅读(1839) 评论(7) 推荐(0)

导航