文章 表白

正文

表白代码最强篇,人人都能喜提女友

编辑:西瓜2021-06-24 17:09:171599

  既然是表白,就要大声说出来,不过现在的文化潮流已经不是那句——安红,我想你!而是要浪漫,什么是浪漫?这个时候就没几个人说得清楚了,总之就是表白要让女生看不出来,又能看得出来,处于两者之间的那种微妙境界。

  因此就有了高级表白暗语、绝对看不出来的表白、表白密码……等一系列迷之操作,在这个舔狗都会说土味情话的时代,你却只会对女生表白说——做俺对象吧……

  你觉得自己的表白有创意吗?因此表白就是要不断创新,弄一些花样出来,比如试试表白代码的说。

1.jpg

C++表白代码

关键在于使用SetConsoleTextAttribute(out,k)函数设置颜色

#include<iostream>

#include<windows.h>

#include<stdlib.h>

using namespace std;

const int longtime=400;

const int shorttime=40;

HANDLE out=GetStdHandle(STD_OUTPUT_HANDLE);

void printwrite()

{

    int k;

    for(k=1;k<8;k++)

    {

        SetConsoleTextAttribute(out,k+1);//设置颜色

        cout<<"亲爱的"<<endl<<

            "鹊桥弯弯情谊浓,牛郎织女见面欢。"<<endl<<

            "星河璀璨空中闪,天上人间共缠绵。"<<endl<<

            "手牵手儿心相连,知心的话说不完。"<<endl<<

            "幸福生活绕身边,爱情滚滚似江河,滔滔不绝心中现。"<<endl<<

            "只愿此生永相伴,生生死死手相牵。愿你七夕快乐无限!"<<endl;

        system("cls");//清屏

        Sleep(longtime);

    }

}

void printlove()

{

    int k=0,i,j;

    char piercing_arrow[][34]={//一行33个字符

"      ☆☆ ☆☆  ☆☆ ☆☆       ",

"     ★★      ★       ★★     ",

"    ☆☆   快乐每一天    ☆☆    ",

"     ★★               ★★     ",

">>>---------I LOVE YOU --------->",

"        ★★         ★★        ",

"          ☆☆     ☆☆          ",

"            ★★  ★★           ",

"               ☆☆              "

};

SetConsoleTextAttribute(out,10);//设置颜色

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

        for(j=0;j<34;j++)

        {cout<<piercing_arrow[i][j];

        if(j==33)

        cout<<endl;

        Sleep(shorttime);

        }

        system("cls");//清屏

        while(k<7){

   SetConsoleTextAttribute(out,k+7);//设置颜色

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

      for(j=0;j<34;j++)

      {cout<<piercing_arrow[i][j];

      if(j==33)

      cout<<endl;}

      k++;

        system("cls");

        Sleep(longtime);

        }

 

}

int main()

{

printwrite();

printlove();

return 0;

微信图片_20210624170405.png

Java表白代码

public class PrintHeart {  

  public static void main(String[] args){

            System.out.println(printHeart("*"));

        }

        private static String printHeart(String input) {

            int[] array = {0, 1, 0, 0, 0, 1, 0,

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

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

                     1, 4, 5, 2, 3, 4, 1,

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

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

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

                     0, 0, 0, 0, 0, 0, 0};

            StringBuffer pi = new StringBuffer();

            for (int i = 0; i < array.length; i++) {

                if (i % 7 == 0)

                    pi.append("

");

                if (array[i] == 0)

                    pi.append("   ");

                else if (array[i] == 4)

                    pi.append("   ");

                else if (array[i] == 5)

                    pi.append("???");

                else if(array[i] == 2)

                    pi.append(" ??");

                else if(array[i] == 3)

                    pi.append(" ??");

            else

                    pi.append(" " + input);

            }

            return pi.toString();

        }

}

免责申明:部分文章和图片来源于网络,如本站文章和图片涉及版权等问题,请联系本站,会尽快修改删除处理。

智能推荐