生日祝福及代码

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

1。生日心形祝福图。实验代码:#includeiostream#includestdio.h#includevector#includelist#includestack#includequeue#includemap#includeset#includemath.h#includestring#includedeque#includeiomanipusingnamespacestd;voidprintheart2(){cout祝Á¡ê福¡ê你?生¦¨²日¨?快¨¬乐¤?,ê?此ä?生¦¨²遇®?见?你?已°?很¨¹美¨¤!ê?endl;coutsetw(34)tomygirlfriend!endl;coutsetw(40)--byxxxxxendl;doubleitem1,item2;inth=3;for(item2=-4;item2=0;item2+=0.3){for(item1=-4;item1=4;item1+=0.2){if(fabs(sqrt(item1*item1+item2*item2)-h*sin(2*atan(item2/item1)))=1||fabs(sqrt(item1*item1+item2*item2)-h*sin(2*atan(-item2/item1)))=1)cout*;elsecout;}coutendl;}for(item2=-1;item2=0;item2+=0.2){for(item1=-4;item1=4;item1+=0.2){if(fabs(item2)-0.65*item1*item1=0.2)cout*;elsecout;}coutendl;}}主函数intmain(){printheart2();return0;}实验输出图形:

1 / 4
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功