愛之心

demo:

#include <cstdio>
#include <iostream>
using namespace std;
int main()
{
	char name[30];
	int i;
	float x,y,a;
	for(y=1.5; y>-1.5; y-=0.1) {
		for(x=-1.5; x<1.5; x+=0.05 ) {
			a = x * x + y * y - 1;
			putchar(a * a * a - x * x * y * y *y <= 0.0 ? '*' :' ');
		}
		putchar('\n');
	} 
	return 0;
 } 

運行結果:

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章