当前位置:   article > 正文

生日快乐程序员的浪漫代码_程序员的浪漫,将枯燥的事情变为对对你的七夕表白,三份代码情书请查收。...

vbs祝贺生日代码

程序员们可能没有妙笔生花的文采,也没有动人的歌喉,他们或许不善表达,但是他们用自己的方式表达着自己的感情。

寿司精选了几个有代表意义的代码,分享给大家,祝所有程序员以及配偶们,七夕快乐。

对于编程小白,寿司也为你准备了一份继续,拉到最后一节,愿这份简单的小代码能让你对编程产生多一点的兴趣。

[代码运行效果截图]

9b3a3f266dba4ad1138332d16df11ed4.png
专属于程序员的浪漫

这个代码历史悠久,好像是我打出来的第一份表白代码,至今仍然保存在寿司的U盘中

以下代码可直接复制粘贴,如果觉得麻烦,可以拉到最后,有网盘链接等着你。

#include<iostream.h>

#include<windows.h>

#include<stdio.h>

#define stoptimeshort 40

#define stoptimelong 100

void main()

{

//

char ch[10];

int f[9][36]={ 0,1,1,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,

0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,

0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1,

0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1,

0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,

0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,

0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,

0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,

0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0

};

int s[9][21]={ 0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,

0,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1,0,

1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,1,

1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,

0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,

0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,

0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,

0,0,0,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,

0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,

};

int t[9][22]={ 0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,

0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,

1,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,

1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,

0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,

0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,

0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,

0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,

0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,

};

system ( "title I Love You" );

//

printf ( "%s"," " );

Sleep ( stoptimelong );

printf ( "%s","其" );

Sleep ( stoptimeshort );

printf ( "%s","实n" );

printf ( "%s"," " );

system ( "color 72" );

Sleep ( stoptimelong );

printf ( "%s","有" );

Sleep ( stoptimeshort );

printf ( "%s","一" );

Sleep ( stoptimeshort );

printf ( "%s","句" );

Sleep ( stoptimeshort );

printf ( "%s","话n" );

///

printf ( "%s"," " );

system ( "color 79" );

Sleep ( stoptimelong );

printf ( "%s","一" );

Sleep ( stoptimeshort );

printf ( "%s","直" );

Sleep ( stoptimeshort );

printf ( "%s","藏" );

Sleep ( stoptimeshort );

printf ( "%s","在" );

Sleep ( stoptimeshort );

printf ( "%s","我" );

Sleep ( stoptimeshort );

printf ( "%s","心" );

Sleep ( stoptimeshort );

printf ( "%s","里n" );

/

printf ( "%s"," " );

system ( "color 7c" );

Sleep ( stoptimelong );

printf ( "%s","可" );

Sleep ( stoptimeshort );

printf ( "%s","是n" );

///

printf ( "%s"," " );

system ( "color 7d" );

Sleep ( stoptimelong );

printf ( "%s","我" );

Sleep ( stoptimeshort );

printf ( "%s","没" );

Sleep ( stoptimeshort );

printf ( "%s","有" );

Sleep ( stoptimeshort );

printf ( "%s","勇" );

Sleep ( stoptimeshort );

printf ( "%s","气" );

Sleep ( stoptimeshort );

printf ( "%s","对" );

Sleep ( stoptimeshort );

printf ( "%s","你" );

Sleep ( stoptimeshort );

printf ( "%s","说n" );

///

printf ( "%s"," " );

system ( "color 7e" );

Sleep ( stoptimelong );

printf ( "%s","今" );

Sleep ( stoptimeshort );

printf ( "%s","天n" );

//

printf ( "%s"," " );

system ( "color 7a" );

Sleep ( stoptimelong );

printf ( "%s","我" );

Sleep ( stoptimeshort );

printf ( "%s","终" );

Sleep ( stoptimeshort );

printf ( "%s","于" );

Sleep ( stoptimeshort );

printf ( "%s","鼓" );

Sleep ( stoptimeshort );

printf ( "%s","起" );

Sleep ( stoptimeshort );

printf ( "%s","勇" );

Sleep ( stoptimeshort );

printf ( "%s","气n" );

///

printf ( "%s"," " );

system ( "color 7b" );

Sleep ( stoptimelong );

printf ( "%s","我" );

Sleep ( stoptimeshort );

printf ( "%s","要" );

Sleep ( stoptimeshort );

printf ( "%s","对" );

Sleep ( stoptimeshort );

printf ( "%s","你" );

Sleep ( stoptimeshort );

printf ( "%s","说:n" );

///

printf ( "%s"," " );

system ( "color 79" );

Sleep ( stoptimelong );

printf ( "%s","我" );

Sleep ( stoptimeshort );

printf ( "%s","…n" );

/

printf ( "%s"," " );

system ( "color 72" );

Sleep ( stoptimelong );

printf ( "%s","我" );

Sleep ( stoptimeshort );

printf ( "%s","…" );

Sleep ( stoptimeshort );

printf ( "%s","…n" );

//

Sleep ( stoptimelong );

system ( "color fc" );

for ( int i=0; i<9; i++ )

{

cout<<" ";

for ( int j=0; j<36; j++ )

{

if ( f[i][j]==0 )

cout<<" ";

else

cout<<"*";

}

cout<<endl;

Sleep ( 100 );

}

/

line:

printf ( "%s"," " );

Sleep ( stoptimelong );

printf ( "%s","你" );

Sleep ( stoptimeshort );

printf ( "%s","愿" );

Sleep ( stoptimeshort );

printf ( "%s","意" );

Sleep ( stoptimeshort );

printf ( "%s","接" );

Sleep ( stoptimeshort );

printf ( "%s","受" );

Sleep ( stoptimeshort );

printf ( "%s","我" );

Sleep ( stoptimeshort );

printf ( "%s","吗" );

Sleep ( stoptimeshort );

printf ( "%s","?(Y/N)" );

cout<<endl;

cout<<" ";

cin>>ch;

Sleep ( stoptimelong );

if ( ch[0]=='y'||ch[0]=='Y' )

{

system ( "color fc" );

for ( int i=0; i<9; i++ )

{

cout<<" ";

for ( int j=0; j<21; j++ )

{

if ( s[i][j]==0 )

cout<<" ";

else

cout<<"*";

}

cout<<endl;

Sleep ( 100 );

}

Sleep ( 3000 );

}

else

{

if ( ch[0]=='n'||ch[0]=='N' )

{

system ( "color 0f" );

for ( int i=0; i<9; i++ )

{

cout<<" ";

for ( int j=0; j<22; j++ )

{

if ( t[i][j]==0 )

cout<<" ";

else

cout<<"*";

}

cout<<endl;

Sleep ( 100 );

}

printf ( "%s"," " );

Sleep ( stoptimelong );

printf ( "%s","心" );

Sleep ( stoptimeshort );

printf ( "%s","碎" );

Sleep ( stoptimeshort );

printf ( "%s","了" );

Sleep ( stoptimeshort );

printf ( "%s","……n" );

}

else

goto line;

}

system ( "color 0f" );

system ( "pause" );

}


这个是可以让女生互动的,实例截图就不放了,只能说,值得你期待。

惯例,代码也放在了最后网盘链接中。

#include <stdio.h>

#include <math.h>

#include <windows.h>

#include <string.h>

#define GFNAME "这里写ta的名字"

#define U 0.1

#define V 0.057

#define M 1.1

#define N 1.2

void showLove()

{

double x, y;

int i=0;

char WhatYouWantToSay[27][255]={

" "," "," "," ","亲爱的:",

"──────────────────",

"t~(≧▽≦)/~","──────────────────",

"t你","──────────────────",

"t终于来了","──────────────────",

"t世界是黑暗的","──────────────────",

"t唯有有你的地方才是光明",

"──────────────────","t★我★爱★你★!",

"──────────────────",

"t不需要太多的言语去修饰",

"──────────────────",

"t我要你幸福","──────────────────",

" ","t 这里写日期"," ","t---永远爱你的:你的名字 "," "

};

for(y = 1.3;y >= -1.3; y -= U)

{

for(x = -1.2; x <= 2.7; x = V)

{

if((( (x*x y*y - 1)*(x*x y*y - 1) * (x*x y*y - 1)

-x*x*y*y*y )<= 0))

printf("*");

else if(x>1.2){

printf("t");

for(int j=0;WhatYouWantToSay[i][j]!='0';j )

{

printf("%c",WhatYouWantToSay[i][j]);

if(i%2)

Sleep(1);

else

Sleep(rand()%90);

}

if(i==4)

printf("★%s★",GFNAME);

break;

}

else

printf(" ");

fflush(stdout);

Sleep(10);

}

printf("n");

i ;

}

}

void showSkull()

{

char filename[]="kl.txt";

FILE *fp;

if(!(fp=fopen(filename,"a ")))

printf("Can't open the file!n");

char buf[128];

while(fgets(buf,128,fp))

{

printf("ttt%s",buf);

}

printf("n");

}

int main()

{

char name[32];

printf("ttt请输入你的名字,回车确定:nttt");

scanf("%s",name);

system("cls");

if(strcmp(name,GFNAME)==0)

showLove();

else

showSkull();

return 0;

}


小白可以直接上手编辑并发送的表白代码。

或许你在抖音上看过很多用记事本写出很炫酷的程序,其实原理很简单,按照下面的步骤,一步步做,包你学会。

1.打开记事本(桌面点击右键,新建,文本文档)

2.把输入法调成英文,在文本框中输入

msgbox("")

3.将上面打好的msgbox("")多复制几个

4.在引号之间打上你想说的话

6fbd8e30d2f3d0383883900cd2ecf9fc.png
比如这样

5.保存(快捷键 ctrl+s)

6.在桌面上将这个文件重命名一个你喜欢的名字

7.修改拓展名为.vbs(如果刚刚保存的文件的名以.txt结尾,将输入法调为英文,把.txt换成.vbs即可,然后进行步骤9;如果看不到.txt,请跳转到步骤8)

8.随便打开一个文件夹,点击最上面的查看,在跳出来的页面里将最右边 文件扩展名前面打勾。然后回到第七步。

9.把这个文件发给ta.

Ps.想要寿司写好的,请

代码链接1.

https://pan.baidu.com/s/1z1BQZhqDkLyPwEdEf6wGog 提取码:r9p5

代码链接2

https://pan.baidu.com/s/16Ei6poOvOmsOcOQgZ9d-gA 提取码:i2qi

代码链接3

https://pan.baidu.com/s/1bJkTPamE183fqbGzrMO7QQ 提取码:2zs7

打字不易,给寿司一个点赞呗

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/194430
推荐阅读
相关标签
  

闽ICP备14008679号