學(xué)AI,好工作 就找北大青鳥
關(guān)注小青 聽課做題,輕松學(xué)習
周一至周日
4000-9696-28

【520表白日】程序員如何表白嗎?程序員表白教程送給你!

來源:北大青鳥總部 2020年05月20日 09:24

摘要: 【520表白日】程序員如何表白嗎?程序員表白教程送給你!

1589937755852126.jpg

所有不曾料想過的問題,都會隨著時間的推移而與你不期而遇;你所有曾經(jīng)瀟灑的隨遇而安,同樣也會隨時間流逝而讓你承擔那些似乎命中已經(jīng)注定的代價。

同學(xué)們,眼看520眼看就要到了,身為程序員的你,想沒想過你的技術(shù)能夠在求愛的時候用上呢?如果能用寫程序的方式表白,這又何嘗不是一種浪漫呢?!

這不,已經(jīng)有程序員同行寫出了這樣的程序,如果你也是個程序員,可以從中得到啟發(fā),做出自己專屬的表白程序,如果不是,也可以直接拿此程序炫耀下。

此程序是用C++語言所寫。下面我們就來欣賞下程序代碼及運行結(jié)果。
代碼如下:
C++代碼
1. #include <iostream> #include <windows.h> #include <stdio.h> using namespace std;
2.  
3. #define stoptimeshort  40  
4. #define stoptimelong   100
5.  
6. void main()  
7. {  
8.     //////////////////  
9.     char ch[10];  
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,  
11.                    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,  
12.                    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,  
13.                    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,  
14.                    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,  
15.                    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,  
16.                    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,  
17.                    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,  
18.                    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  
19.                 };  
20.    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,  
21.                    0,1,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1,0,  
22.                    1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,1,  
23.                    1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,  
24.                    0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,  
25.                    0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,  
26.                    0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,  
27.                    0,0,0,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,0,0,0,  
28.                    0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,  
29.                 };  
30.    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,  
31.                    0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,  
32.                    1,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,  
33.                    1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,  
34.                    0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,  
35.                    0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,1,0,0,  
36.                    0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,  
37.                    0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,  
38.                    0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,  
39.                 };  
40.    system ( "title I Love You" );  
41.    //////////////////  
42.    printf ( "%s","        " );  
43.    Sleep ( stoptimelong );  
44.    printf ( "%s","其" );  
45.    Sleep ( stoptimeshort );  
46.    printf ( "%s","實\n" );  
47.    ////////////////////////////////  
48.    printf ( "%s","        " );  
49.    system ( "color 72" );  
50.    Sleep ( stoptimelong );  
51.    printf ( "%s","有" );  
52.    Sleep ( stoptimeshort );  
53.    printf ( "%s","一" );  
54.    Sleep ( stoptimeshort );  
55.    printf ( "%s","句" );  
56.    Sleep ( stoptimeshort );  
57.    printf ( "%s","話\n" );  
58.    ///////////////////////////  
59.    printf ( "%s","        " );  
60.    system ( "color 79" );  
61.    Sleep ( stoptimelong );  
62.    printf ( "%s","一" );  
63.    Sleep ( stoptimeshort );  
64.    printf ( "%s","直" );  
65.    Sleep ( stoptimeshort );  
66.    printf ( "%s","藏" );  
67.    Sleep ( stoptimeshort );  
68.    printf ( "%s","在" );  
69.    Sleep ( stoptimeshort );  
70.    printf ( "%s","我" );  
71.    Sleep ( stoptimeshort );  
72.    printf ( "%s","心" );  
73.    Sleep ( stoptimeshort );  
74.    printf ( "%s","里\n" );  
75.    /////////////////////////////  
76.    printf ( "%s","        " );  
77.    system ( "color 7c" );  
78.    Sleep ( stoptimelong );  
79.    printf ( "%s","可" );  
80.    Sleep ( stoptimeshort );  
81.    printf ( "%s","是\n" );  
82.    ///////////////////////////////  
83.    printf ( "%s","        " );  
84.    system ( "color 7d" );  
85.    Sleep ( stoptimelong );  
86.    printf ( "%s","我" );  
87.    Sleep ( stoptimeshort );  
88.    printf ( "%s","沒" );  
89.    Sleep ( stoptimeshort );  
90.    printf ( "%s","有" );  
91.    Sleep ( stoptimeshort );  
92.    printf ( "%s","勇" );  
93.    Sleep ( stoptimeshort );  
94.    printf ( "%s","氣" );  
95.    Sleep ( stoptimeshort );  
96.    printf ( "%s","對" );  
97.    Sleep ( stoptimeshort );  
98.    printf ( "%s","你" );  
99.    Sleep ( stoptimeshort );  
100.    printf ( "%s","說\n" );  
101.    ///////////////////////////////  
102.    printf ( "%s","        " );  
103.    system ( "color 7e" );  
104.    Sleep ( stoptimelong );  
105.    printf ( "%s","今" );  
106.    Sleep ( stoptimeshort );  
107.    printf ( "%s","天\n" );  
108.    //////////////////////////////  
109.    printf ( "%s","        " );  
110.    system ( "color 7a" );  
111.    Sleep ( stoptimelong );  
112.    printf ( "%s","我" );  
113.    Sleep ( stoptimeshort );  
114.    printf ( "%s","終" );  
115.    Sleep ( stoptimeshort );  
116.    printf ( "%s","于" );  
117.    Sleep ( stoptimeshort );  
118.    printf ( "%s","鼓" );  
119.    Sleep ( stoptimeshort );  
120.    printf ( "%s","起" );  
121.    Sleep ( stoptimeshort );  
122.    printf ( "%s","勇" );  
123.    Sleep ( stoptimeshort );  
124.    printf ( "%s","氣\n" );  
125.    ///////////////////////////////  
126.    printf ( "%s","        " );  
127.    system ( "color 7b" );  
128.    Sleep ( stoptimelong );  
129.    printf ( "%s","我" );  
130.    Sleep ( stoptimeshort );  
131.    printf ( "%s","要" );  
132.    Sleep ( stoptimeshort );  
133.    printf ( "%s","對" );  
134.    Sleep ( stoptimeshort );  
135.    printf ( "%s","你" );  
136.    Sleep ( stoptimeshort );  
137.    printf ( "%s","說:\n" );  
138.    ///////////////////////////////  
139.    printf ( "%s","        " );  
140.    system ( "color 79" );  
141.    Sleep ( stoptimelong );  
142.    printf ( "%s","我" );  
143.    Sleep ( stoptimeshort );  
144.    printf ( "%s","…\n" );  
145.    /////////////////////////////////  
146.    printf ( "%s","        " );  
147.    system ( "color 72" );  
148.    Sleep ( stoptimelong );  
149.    printf ( "%s","我" );  
150.    Sleep ( stoptimeshort );  
151.    printf ( "%s","…" );  
152.    Sleep ( stoptimeshort );  
153.    printf ( "%s","…\n" );  
154.    //////////////////////////////////  
155.    Sleep ( stoptimelong );  
156.    system ( "color fc" );  
157.    for ( int i=0; i<9; i++ )  
158.    {  
159.        cout<<"        ";  
160.        for ( int j=0; j<36; j++ )  
161.        {  
162.            if ( f[i][j]==0 )  
163.                cout<<" ";  
164.            else  
165.                cout<<"*";  
166.        }  
167.        cout<<endl;  
168.        Sleep ( 100 );  
169.    }  
170.    /////////////////////////////////////  
171.line:  
172.    printf ( "%s","        " );  
173.    Sleep ( stoptimelong );  
174.    printf ( "%s","你" );  
175.    Sleep ( stoptimeshort );  
176.    printf ( "%s","愿" );  
177.    Sleep ( stoptimeshort );  
178.    printf ( "%s","意" );  
179.    Sleep ( stoptimeshort );  
180.    printf ( "%s","接" );  
181.    Sleep ( stoptimeshort );  
182.    printf ( "%s","受" );  
183.    Sleep ( stoptimeshort );  
184.    printf ( "%s","我" );  
185.    Sleep ( stoptimeshort );  
186.    printf ( "%s","嗎" );  
187.    Sleep ( stoptimeshort );  
188.    printf ( "%s","?(Y/N)" );  
189.    ////////////////////////////////////  
190.    cout<<endl;  
191.    cout<<"        ";  
192.    cin>>ch;  
193.    Sleep ( stoptimelong );  
194.    if ( ch[0]=='y'||ch[0]=='Y' )  
195.    {  
196.        system ( "color fc" );  
197.        for ( int i=0; i<9; i++ )  
198.        {  
199.            cout<<"        ";  
200.            for ( int j=0; j<21; j++ )  
201.            {  
202.                if ( s[i][j]==0 )  
203.                    cout<<" ";  
204.                else  
205.                    cout<<"*";  
206.            }  
207.            cout<<endl;  
208.            Sleep ( 100 );  
209.        }  
210.        Sleep ( 3000 );  
211.    }  
212.    else  
213.    {  
214.        if ( ch[0]=='n'||ch[0]=='N' )  
215.        {  
216.            system ( "color 0f" );  
217.            for ( int i=0; i<9; i++ )  
218.            {  
219.                cout<<"        ";  
220.                for ( int j=0; j<22; j++ )  
221.                {  
222.                    if ( t[i][j]==0 )  
223.                        cout<<" ";  
224.                    else  
225.                        cout<<"*";  
226.                }  
227.                cout<<endl;  
228.                Sleep ( 100 );  
229.            }  
230.            printf ( "%s","        " );  
231.            Sleep ( stoptimelong );  
232.            printf ( "%s","心" );  
233.            Sleep ( stoptimeshort );  
234.            printf ( "%s","碎" );  
235.            Sleep ( stoptimeshort );  
236.            printf ( "%s","了" );  
237.            Sleep ( stoptimeshort );  
238.            printf ( "%s","……\n" );  
239.        }  
240.        else  
241.            goto line;  
242.    }  
243.    system ( "color 0f" );  
244.    system ( "pause" );  
245.}  
運行效果截圖:



      怎么樣?還是很有意思的吧?這才是與眾不同的表白方式啊!應(yīng)該會增加成功幾率哦!
      好了,同學(xué)們,輕松愉悅的事情講完了,接下來給大家?guī)硪恍嶋H的內(nèi)容,良心出品,絕對干貨,之前的一篇文章"一篇文章,讓你愛情與編程比翼雙飛"給大家講了我總結(jié)提煉的戀愛三部曲,有不少同學(xué)找我來咨詢到底如何維護好長期關(guān)系,說在上一篇文章里沒有講清楚,今晚就和大家好好聊一聊這個話題,把我總結(jié)的如果維護好長期關(guān)系的七個要點給大家講一講。
1, 不要把戀愛當成你生活的全部。更不要把對方當成全世界。你還有工作,朋友,夢想,一大堆未完成的計劃。當初她或他也是因為這些特質(zhì)選擇和你在一起的。
2,溝通可以解決戀愛中90%以上的問題,那么剩下的10%就是各自的秘密,打死都不能說的,所以請收起你的好奇心,這很重要。尊重比打著”我為你好“的旗號獲取對方隱私更可愛。
3,每個人都有不可逾越的底線,每個人忍耐都是有限度的,每個人都是有脾氣的,所以不要再公開場合互相拆臺,恩愛可以在外面秀,但是有情緒回家吵。
4,不要放棄浪漫,記住每個屬于你們的特殊紀念日,哪怕是一句簡單的問候,生日快樂,都倍感欣慰。
5,吵架很正常,但是,無休止的因為同一個問題吵架,很悲催。戀愛是一場求同存異,共同成長的旅程,達爾文的進化定律是優(yōu)勝劣汰,戀愛也是如此,沒有那一場戀愛是一勞永逸的。
6,戀愛的本質(zhì)一定是基于價值平衡的,就像是蹺蹺板游戲,不能是一個高高在上,一個卑微到塵埃里,永遠記住時刻提升自己的方方面面,哪怕同學(xué)們你們已經(jīng)談了很長時間的戀愛了。
7,那些沒有未來的人,忍痛都要割掉,你的堅持只是別人厭惡的理由。分手是沒有理由的,一切的理由都是不愛的借口。
同學(xué)們,今晚就到這了,最后送大家一句話:變成更好的樣子,才是送給你喜歡的人和喜歡你的人的最好禮物,所以先好好經(jīng)營自己吧。

文章來源:煙臺課工場

熱門班型時間
人工智能就業(yè)班 即將爆滿
AI應(yīng)用線上班 即將爆滿
UI設(shè)計全能班 即將爆滿
數(shù)據(jù)分析綜合班 即將爆滿
軟件開發(fā)全能班 爆滿開班
網(wǎng)絡(luò)安全運營班 爆滿開班
報名優(yōu)惠
免費試聽
課程資料
官方微信
返回頂部
培訓(xùn)課程 熱門話題 站內(nèi)鏈接