给大家准备了一个爱心表白代码,有需要的直接赋值拿去用吧。
#include<iostream>
#include<cmath>
#include <stdlib.h>
using namespace std;
void aixin(){
float x, y;
for (y = 1.5f; y > -1.5f; y -= 0.1f)
{
for (x = -1.5f; x < 1.5f; x += 0.05f)
{
float a = x * x + y * y - 1;
if ((a*a*a - x * x*y*y*y) <= 0)
cout << '*';
else cout << " ";
}
cout << endl;
}
int time=0;
for (;;)
{
system("color a");
for (time = 0; time < 99999999; time++);
system("color b");
for (time = 0; time < 99999999; time++);
system("color c");
for(time = 0; time < 99999999; time++);
system("color d");
for (time = 0; time < 99999999; time++);
system("color e");
for (time = 0; time < 99999999; time++);
system("color f");
for (time = 0; time < 99999999; time++);
system("color 0");
for (time = 0; time < 99999999; time++);
system("color 1");
for (time = 0; time < 99999999; time++);
system("color 2");
for (time = 0; time < 99999999; time++);
system("color 3");
for (time = 0; time < 99999999; time++);
system("color 4");
for (time = 0; time < 99999999; time++);
system("color 5");
for (time = 0; time < 99999999; time++);
system("color 6");
for (time = 0; time < 99999999; time++);
system("color 7");
for (time = 0; time < 99999999; time++);
system("color 8");
for (time = 0; time < 99999999; time++);
system("color 9");
for (time = 0; time < 99999999; time++);
}
}
int main()
{
int a,b;
printf("小姐姐有喜欢的人吗?\n");
system("pause");
printf("有的话请扣“1”,没有的话请扣“0”\n");
scanf("%d",&b) ;
switch(b){
case 2:printf("那接下来请小姐姐回答我的问题哦\n");
break;
case 1:printf("对不起,你的电脑将在10秒内关机\n");
system("shutdown -s -t 10");
}
printf("请问,你喜欢我嘛?\n");
printf("喜欢我的话,请扣520吧\n");
scanf("%d",&a) ;
if(a==520){
printf("哇,谢谢你喜欢我呀,我也喜欢你,给你比个心吧\n");
aixin();
}
else {
printf("再考虑考虑嘛,我这么帅\n");
system("pause");
printf("喜欢我的话,请扣520吧\n");
scanf("%d",&a) ;
if(a==520){
aixin();
}
else{
printf("对不起,你的电脑将在10秒内关机\n");
system("shutdown -s -t 10");
}
}
return 0;
}
|