C語言實(shí)現(xiàn)520表白代碼 祝你表白成功!
本文實(shí)例為大家分享了C語言實(shí)現(xiàn)520表白的具體代碼,供大家參考,具體內(nèi)容如下
在這個(gè)狂虐單身狗的節(jié)日,實(shí)在無聊寫了幾行也不知道向誰告白的代碼,獻(xiàn)丑獻(xiàn)丑:
#include<stdio.h>
#include<math.h>
int main()
{
float y, x, z;
printf("那一天\n");
printf("第一次遇見你\n");
printf("忘不了\n");
printf("你的容顏\n");
printf("若輕云之蔽月,如流風(fēng)之回雪\n");
printf("\n\n\n");
printf("其實(shí)\n");
printf("有一句話\n");
printf("我一直想對(duì)你說:\n");
for (double y = 2.5; y >= -1.6; y = y - 0.2)
{
for (double x = -3; x <= 4.8; x = x + 0.1)
{
(pow((x*x + y*y - 1), 3) <= 3.6*x*x*y*y*y
|| (x>-2.4 && x<-2.1 && y<1.5 && y>-1)
|| (((x<2.5 && x>2.2) || (x>3.4 && x<3.7)) && y>-1 && y<1.5)
|| (y>-1 && y<-0.6 && x<3.7 && x>2.2)) ? printf("*") : printf(" ");
}
printf("\n");
}
getchar();
}
運(yùn)行效果圖:

代碼二
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#define I 20
#define R 340
#include <string.h>
int main()
{
char answer[10];
printf("遇到你\n我才發(fā)現(xiàn)\n曾經(jīng)所有的條件\n似乎都成了我等你的借口\n\n");
printf("請(qǐng)?jiān)试S我,從今往后映入你\n明媚的眼\n");
printf("輸入yes或no,點(diǎn)擊Enter");
printf("\n ");
scanf("%s", answer);
char b[4]="yes";
if(strcmp(answer,b)==0)
{
float y, x, z, f;
for (y = 1.5f; y > -1.5f; y -= 0.1f)
{
for (x = -1.5f; x < 1.5f; x += 0.05f)
{
z = x * x + y * y - 1;
f = z * z*z - x * x*y*y*y;
putchar(f <= 0.0f ? "*********"[(int)(f*-8.0f)] : ' ');
}
putchar('\n');
}
long time;
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");
}
getchar();
}
else
{
printf("\n好吧,那就相忘于江湖吧!\n");
}
return 0;
}
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
C語言 風(fēng)靡一時(shí)的黃金礦工游戲?qū)崿F(xiàn)流程詳解
《黃金礦工》是一款非常經(jīng)典的游戲。在游戲中,玩家通過不斷挖礦,獲取金子,最終能夠闖入下一關(guān)。在這個(gè)過程中,會(huì)不斷有巖石、煙霧、老鼠來搗亂,甚至還會(huì)出現(xiàn)扛著炸藥包的小老鼠,玩家必須戰(zhàn)勝它們,才能進(jìn)入更深的礦坑2021-11-11
正確理解C++的構(gòu)造函數(shù)和析構(gòu)函數(shù)
在C++的學(xué)習(xí)中,可以把類當(dāng)作一個(gè)模具,類實(shí)例化出來的對(duì)象就是根據(jù)這個(gè)模具所產(chǎn)生的實(shí)體,對(duì)象看作是自己創(chuàng)建的一個(gè)新的數(shù)據(jù)類型。本文主要介紹了類對(duì)象通過拷貝函數(shù)進(jìn)行初始化,分析類對(duì)象的內(nèi)存模型,以及通過this指針實(shí)現(xiàn)更復(fù)雜的功能。最后介紹了析構(gòu)函數(shù)的基礎(chǔ)知識(shí)2021-06-06
c++實(shí)現(xiàn)單純形法現(xiàn)行規(guī)劃問題的求解(推薦)
這篇文章主要介紹了c++實(shí)現(xiàn)單純形法現(xiàn)行規(guī)劃問題的求解,本文針對(duì)問題通過實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-04-04
從匯編看c++的默認(rèn)析構(gòu)函數(shù)的使用詳解
本篇文章是對(duì)c++中默認(rèn)析構(gòu)函數(shù)的使用進(jìn)行了詳細(xì)的分析介紹。需要的朋友參考下2013-05-05
QML中動(dòng)態(tài)與靜態(tài)模型應(yīng)用詳解
QML是一種描述性的腳本語言,文件格式以.qml結(jié)尾。語法格式非常像CSS(參考后文具體例子),但又支持javascript形式的編程控制。QtDesigner可以設(shè)計(jì)出·ui界面文件,但是不支持和Qt原生C++代碼的交互2022-08-08

