c语言表白代码玫瑰(c语音表白代码)

http://www.itjxue.com  2023-03-25 04:25  来源:未知  点击次数: 

你是不是有999玫瑰C语言版源代码能给我吗

#include dos.h

#include graphics.h

#include math.h

/*玫瑰花*/

#define FNX(x) (int)(xo+(x)*1.0)

#define FNY(y) (int)(getmaxy()-(yo+(y)*1.0))

#define FNX2(phi) cos(phi)*ac-sin(phi)*bs

#define FNY2(phi) cos(phi)*as+sin(phi)*bc

/*画旋转的椭圆*/

void elli(int xo,int yo,int a,int b,double theta)

{

int i;

double da,c,s,ac,as,bc,bs,xf,yf,phi,x,y;

theta=theta*0.01745;

da=3*0.1745;

c=cos(theta);

s=sin(theta);

ac=a*c;as=a*s;

bc=b*c;bs=b*s;

x=FNX2(0);

y=FNY2(0);

moveto(FNX(x),FNY(y));

for(i=1;i=360;i++)

{

phi=i*da;

xf=x*cos(phi)*0.1;

yf=b*sin(phi)*0.1;

x=FNX2(phi);

y=FNY2(phi);

lineto(FNX(x),FNY(y));

}

}

/*花*/

void hua(int x,int y)

{

register i;

/*画粉红色玫瑰*/

setcolor(12);

arc(x+65,y-60,150,350,8);

arc(x+66,y-54,300,470,8);

arc(x+65,y-56,30,230,10);

arc(x+64,y-57,300,490,17);

ellipse(x+73,y-30,250,450,27,40);

ellipse(x+59,y-30,100,290,27,40);

ellipse(x+65,y-40,140,270,20,30);

setfillstyle(SOLID_FILL,5);

floodfill(x+65,y-20,12);

/*画红色玫瑰*/

arc(x,y,150,350,12);

arc(x+1,y+8,280,470,12);

arc(x,y+2,30,230,16);

arc(x,y+3,80,240,28);

arc(x+2,y+8,180,330,22);

arc(x-2,y+2,310,460,25);

ellipse(x-12,y+30,120,300,30,40);

ellipse(x+10,y+28,250,423,30,42);

ellipse(x-4,y+10,290,393,30,40);

setfillstyle(SOLID_FILL,4);

floodfill(x+5,y+31,12);

/*画紫色花骨朵*/

ellipse(x+120,y+5,0,360,15,25);

setfillstyle(SOLID_FILL,1);

floodfill(x+120,y,12);

/*画黄色花骨朵*/

ellipse(x-70,y+10,0,360,14,20);

setfillstyle(SOLID_FILL,14);

floodfill(x-70,y+10,12);

setcolor(10);

/*画红花花萼*/

ellipse(x-15,y+32,190,310,30,35);

ellipse(x+16,y+32,235,355,26,35);

ellipse(x,y+35,190,350,43,50);

arc(x,y+82,190,350,6);

setfillstyle(SOLID_FILL,2);

floodfill(x,y+75,10);

/*画粉花花萼*/

ellipse(x+50,y-48,190,320,22,50);

ellipse(x+80,y-48,220,350,22,50);

ellipse(x+65,y-28,180,360,36,50);

floodfill(x+65,y+18,10);

/*画主枝*/

for(i=0;i3;i++ )

{

ellipse(x-98,y+100+i,255,371,100,80);

ellipse(x-20,y+30+i,260,358,140,140);

ellipse(x+224,y+20+i,180,218,160,140);

}

/*画侧枝*/

ellipse(x+70,y+34,180,233,140,140);

ellipse(x,y+40,205,255,100,120);

ellipse(x+135,y-30,209,249,72,120);

ellipse(x,y+20,263,301,100,120);

ellipse(x+85,y-10,278,305,100,120);

ellipse(x+100,y-62,282,308,90,120);

ellipse(x-50,y-10,277,314,30,120);

ellipse(x+70,y+80,222,266,52,120);

ellipse(x-60,y-45,229,266,52,120);

ellipse(x+79,y-45,229,266,52,120);

ellipse(x+84,y,224,273,52,120);

ellipse(x+110,y+40,240,282,100,120);

/*画紫花骨朵花萼*/

ellipse(x+120,y-6,200,340,17,25);

ellipse(x+120,y+7,160,380,17,27);

floodfill(x+122,y+30,10);

/*画黄花骨朵花萼*/

ellipse(x-70,y+15,140,390,17,20);

ellipse(x-75,y-10,205,340,10,30);

ellipse(x-60,y-10,195,340,5,30);

floodfill(x-70,y+32,10);

/*画叶*/

/*画右边的叶子*/

elli(x+168,y+282,10,20,-40);

elli(x+160,y+252,8,16,260);

elli(x+145,y+270,8,16,-15);

elli(x+156,y+224,10,20,-45);

elli(x+150,y+200,8,16,270);

elli(x+135,y+220,8,16,-10);

elli(x+146,y+144,8,16,-80);

elli(x+130,y+130,6,12,235);

elli(x+125,y+154,7,14,-10);

elli(x+78,y+98,6,12,-90);

elli(x+60,y+90,5,10,180);

elli(x+70,y+109,5,10,-45);

/*画左边的叶子*/

elli(x-125,y+270,12,24,60);

elli(x-95,y+270,10,20,10);

elli(x-110,y+245,10,20,90);

elli(x-105,y+220,10,20,45);

elli(x-100,y+190,8,16,135);

elli(x-75,y+210,8,16,-45);

/*画中间的叶子*/

elli(x+65,y+190,10,20,-45);

elli(x+40,y+185,8,16,0);

elli(x+55,y+165,8,16,90);

}

/*主程序*/

main()

{

int driver=VGA,mode=VGAHI;

registerbgidriver(EGAVGA_driver);

initgraph(driver,mode,"C:\TC");

cleardevice();

hua(450,90);

setcolor(2);

rectangle(0,0,639,479);

getch();

closegraph();

}

c语言表白程序代码

用C语言编写一个程序相信爱的人表白。

电脑:华为MateBook14

系统:Windows10

软件:VC++

1、正确打开VC++,设置适合自己的字体大小及你想说的话。

2、编写程序:

#include stdio.hvoid main(){printf("*********************\n");printf("我是发自内心的爱你\n");printf("*********************\n");}。

3、点击“编译”,“连接”,“运行”,检验程序是否正确。

求编写一个表白程序?

JAVA

传说中规范的爱情代码(2010-11-10 21:37:36)

转载

标签:it

private final static DEPOSIT = 100000;

private final static FELLING = 8;

public void love(boy, girl) {

Boolean isMarried = false;

if(boy.有房() boy.有车()) {

doMarry(boy, girl);

isMarried = true;

} else if(girl.愿意等()) {

while(!(boy.赚钱 DEPOSIT girl.感情 FELLING)) {

for(int day=1; day =365; day++) {

if( day == 情人节 ) {

if(boy.givegirl(玫瑰)) {

girl.感情++;

} else {

girl.感情--;

}

}

if(day == girl.生日) {

if( boy.givegirl(玫瑰) )

{

girl.感情++;

}

else {

girl.感情--;

boy.拼命赚钱();

}

}

}

if(boy.有房() boy.有车()) {

doMarry(boy, girl);

isMarried = true;

break;

}

年龄++;

girl.感情--;

}

}

if(!IsMarried) {

girl.goto(another_boy);

}

private void doMarry(boy, girl) {

boy.set(nothing);

girl.嫁给(boy);

}

程序员的表白代码

程序员的表白代码

第一条语言:Java代码翻译:直到死之前,每天爱你多一点代码:while(lifeend){love++;}

第二条语言:C语言代码翻译:IcannotsayHellototheWorldwithoutu.代码:#incldestdio.hintmain(){printf(HelloWorldn);retrn0;}//IcannotsayHellototheWorldwithoutu.

第三条语言:python代码翻译:山无陵,江水为竭,冬雷震震,夏雨雪,天地合,乃敢与君绝!代码:if(mountain.arris==None):if(river.water==None):if(winter.thunder==True):if(summer.snow==True):if(sky.height==ground.height):i.withyou=Falseelse:i.withyou=True.

第四条语言:Erlang代码代码翻译:深圳相遇,至死不渝代码:-module(you_and_me).-export([start/1]).-record(person,{name,address,status}).start(Name)-one_world(Name).one_world(Name)keep_to_love_you(Person).say_goodbye(Person)-io:format(~p:seeyounextworld!~n,[Person#person.name]).see_you_next_world(Name)-one_world(Name).

第五条语言:Java语言代码翻译:爱你到天荒地老代码:while(!world.destroy){System.out.println(iloveyou);}

c语言玫瑰花代码短一点

#includeiostream#includecmathusingnamespacestd;voidgetRoseNum(intlower,intupper);boolisRoseNum(intn);voidmain(){intupper,lower;cout“请输入下界:”endl;cinlower;cout“请输入上界:”endl;cinupper。

cout“所有玫瑰花数:”getRoseNum(lower,upper);}voidgetRoseNum(intlower,intupper){if((lower1000)||(upper9999)){cout“上下界错误!”endl;return;}for(inti=lower;i=upper;i++){if(isRoseNum(i))。

注意事项:

C语言是普适性最强的一种计算机程序编辑语言,它不仅可以发挥出高级编程语言的功用,还具有汇编语言的优点,因此相对于其它编程语言,它具有自己独特的特点。具体体现为以下三个方面:

其一,广泛性。C语言的运算范围的大小直接决定了其优劣性。C语言中包含了34种运算符,因此运算范围要超出许多其它语言,此外其运算结果的表达形式也十分丰富。此外,C语言包含了字符型、指针型等多种数据结构形式,因此,更为庞大的数据结构运算它也可以应付。

其二,简洁性。9类控制语句和32个关键字是C语言所具有的基础特性,使得其在计算机应用程序编写中具有广泛的适用性,不仅可以适用广大编程人员的操作,提高其工作效率,同时还能够支持高级编程,避免了语言切换的繁琐。

其三,结构完善。C语言是一种结构化语言,它可以通过组建模块单位的形式实现模块化的应用程序,在系统描述方面具有显著优势,同时这一特性也使得它能够适应多种不同的编程要求,且执行效率高。

(责任编辑:IT教学网)

更多

推荐java认证文章