Since it is a confession, it must be said loudly, but the current cultural trend is no longer that sentence - An Hong, I miss you! It is about romance. What is romance? At this time, few people can explain it clearly. , in short, it is to express love so that girls cannot see it, but also can see it, in that subtle state between the two.
Therefore, there are advanced confession code words, absolutely invisible confessions, confession passwords... and a series of mysterious operations. In this era when licking dogs will say earthy love words, you will only say to them. A girl confesses her love and says - be my partner...
Do you think your confession is creative? Therefore, to confess your love, you need to constantly innovate and come up with some tricks, such as trying to express your love in code.
C++ confession code
The key is to use the SetConsoleTextAttribute(out,k) function to set the color
#include
#include
#include
using namespace std;
const int longtime=400;
const int shorttime=40;
HANDLE out=GetStdHandle(STD_OUTPUT_HANDLE);
void printwrite()< /p>
{
int k;
for(k=1;k<8;k++)
{
SetConsoleTextAttribute(out,k+1);//Set the color
cout<<"Dear"<<endl<<
"The friendship is strong around the Magpie Bridge, and the Cowherd and the Weaver Girl meet happily "<<endl<<
"The stars are shining brightly in the sky, and the sky and the world are entwined. "<<endl<<
"Hand in hand, our hearts are connected, and there are endless words to say. "<<endl<<
"Happy life surrounds me, love rolls like a river, flowing in my heart."<<endl<<
" I only wish to be with you forever in this life, holding hands in life and death. May you have unlimited happiness on Chinese Valentine's Day! "<<endl;
system("cls");//Clear screen
Sleep(longtime);
}
}
void printlove()
{
int k=0,i,j;
char piercing_arrow[][34] ={//33 characters per line
" ☆☆ ☆☆ ☆☆ ☆☆ ",
" ★★ ★ ★★ ",
" ☆ ☆Happy every day☆☆ ",
" ★★ ★★ ",
">>>---------I LOVE YOU ----- ---->",
" ★★ ★★ ",
" ☆☆ ☆☆ ",
" ★★ ★★ ",< /p>
" ☆☆ "
};
SetConsoleTextAttribute(out,10);//Set color
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");//Clear the screen
while(k<7){
SetConsoleTextAttribute(out,k+7);//Set the color
for (i=0;i<9;i++)
for(j=0;j<34;j++)
{cout<<piercing_arrow[i][j];< /p>
if(j==33)
cout<<endl;}
k++;
system("cls");
Sleep(longtime);
}
}
int main()
{
printwrite();
printlove();
return 0;
}
Java expression code
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();
}
}