当前位置:网站首页>谁说程序员不懂浪漫,表白代码来啦~
谁说程序员不懂浪漫,表白代码来啦~
2022-08-04 00:50:00 【骨灰级收藏家】
七夕推荐:
写了一首 Java 表白诗,女朋友不愁了!
Python
if you.look_back(): I.behind(you).forever() see(you)
Java
public class DREAM {
public static void main(String[] args) {
while(true) {
String Mylover = "";
for (int i = 0; i < 3; i++) {
char a = (char)(Math.random() * 26 + 65);
Mylover = Mylover + a;
}
if (Mylover.equals("YOU")) {
System.out.println("My dream comes true!");
break;
}
}
}
}
C#
foreach(var you in world){
if(you == “MyLove”){
MyHeart["My_Wife"] = you;
}
}
C++
abstract class MyLove implements YourHeart{
String MyLove(String I_do){
return "Always and Forever"
}
}
C#
static void Main(string[] args){
I.meet_you();
while(true){
I.missing();
}
}
PHP
<?php
while(me->find()){
If(me->met() == your->self()){
print("Hello,world!")
}
}
?
Python 代码:
import stringl = string.ascii_letterss = []s.append(l[34])s.append(l[11])s.append(l[14])s.append(l[21])s.append(l[4])s.append(l[24])s.append(l[14])s.append(l[20])s.insert(1, " ")s.insert(6, " ")string = "".join(s)print(string) # I love you
以下的数字对应的是 ASCII 码:
# 73、76、79、86、69、85 对应的 ASCII
print(chr(73)) # I
print(chr(76)) # L
print(chr(79)) # O
print(chr(86)) # V
print(chr(69)) # E
print(chr(85)) # U
Python 一行代码实现心形:
print('\n'.join([''.join([('Love'[(x-y) % len('Love')] if ((x*0.05)**2+(y*0.1)**2-1)**3-(x*0.05)**2*(y*0.1)**3 <= 0 else ' ') for x in range(-30, 30)]) for y in range(30, -30, -1)]))
效果图:

按 ctrl+f 键然后输入 9 :
99669999996669999996699666699666999966699666699 99699999999699999999699666699669966996699666699 99669999999999999996699666699699666699699666699 99666699999999999966666999966699666699699666699 99666666999999996666666699666699666699699666699 99666666669999666666666699666669966996699666699 99666666666996666666666699666666999966669999996
效果图如下:

1、直接点的
直到死之前,每天爱你多一点 :

爱你永不停止:

我要让全世界的人知道我爱你:

2、有文化的
彼采萧兮,一日不见,如三秋兮:

你爱或者不爱我,爱就在那里,不增不减:

将我手上的温度全部给予你,换取你幸福的脸庞:

你一句明天见,偷走了我整晚的睡眠:

找到你,我便拥有了整个世界:

3、除了"好呀",没有更好的选择

上面是 VB 代码,我们可以用以下 JS 代码实现更通用:

源代码:
https://c.runoob.com/codedemo/5656
以下是适合移动端的代码,保存下面二维码直接发给你喜欢的就可以了:

源码:
https://c.runoob.com/codedemo/5657网页地址:https://www.runoob.com/try/demo_source/dylm.html
再来个心形的效果:

源码:
https://c.runoob.com/codedemo/5655
cavans 实现玫瑰花,还是很酷炫的:

源码地址:https://c.runoob.com/codedemo/5588
表白成功,我们就能走上人生巅峰了:

4、当然,有时候也有意外情况


没对象也无所谓,谈恋爱哪有写代码有趣!!!
当然,你还可以自己new一个出来。
边栏推荐
- XSS - Bypass for loop filtering
- typescript48 - type compatibility between functions
- Eight things to pay attention to in spot silver
- What warehouse management problems can WMS warehouse management system solve in the electronics industry?
- vxe-table 从页面批量删除数据 (不动数据库里的数据)
- 2022年8月份DAMA-CDGA/CDGP数据治理认证招生简章
- 《The Google File System》新说
- win10+cuda11.7+pytorch1.12.0 installation
- Salesforce's China business may see new changes, rumors may be closing
- 互斥锁、读写锁、自旋锁,以及原子操作指令xaddl、cmpxchg的使用场景剖析
猜你喜欢
随机推荐
The problem of disorganized data output by mnn model
jmeter distributed stress test
typescript55-泛型约束
2015年开源大事件汇总
字符串变形
C语言 函数递归
动态内存二
ping数据包中的进程号
面试必问的HashCode技术内幕
WMS仓储管理系统能解决电子行业哪些仓库管理问题
Web3 security risks daunting?How should we respond?
Mvc、Mvp和Mvvm
Linux安装mysql最简单教程(一次成功)
Nanoprobes丨Nanogold-抗体和链霉亲和素偶联物
typescript51-泛型的基本使用
MPLS综合实验
2022年8月份DAMA-CDGA/CDGP数据治理认证招生简章
无代码7月热讯 | 微软首推数字联络中心平台;全球黑客马拉松...
【链路聚合原理及配置】
corn表达式 具体详解与案例









