當前位置:首頁 » 編程語言 » c語言愛情紀念日代碼
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

c語言愛情紀念日代碼

發布時間: 2023-01-31 18:13:42

c語言代碼表白愛心怎麼運行

你好,你下載一個編譯器,把代碼粘貼進去,編輯一下,點運行即可.
推薦dev-C++編譯器
效果如下:

㈡ c語言表白程序源代碼

你需要的是編譯器,比如TurboC,MSC,或者VC等等,你寫的C代碼只是源程序而已,需要經過C編譯器編譯成可執行的EXE文件。C編譯器有很多,上面提到的就是比較常用的,至於編譯器的使用,你得另查一查使用手冊,一般而言,編譯器都帶有IDE的集成編程環境,可以作為程序的編輯器(別把編輯器和編譯器弄混了,編輯器就是可以輸入源代碼的軟體工具,如記事本就是一個最簡單的編輯器,編譯器就是用於編譯特定語言源代碼的軟體),然後一般都有一個編譯(Compile)按鈕(或者編譯命令),編譯時編譯器會檢查你的源代碼是否有語法錯誤,如果沒有錯誤,還會使用鏈接(Link)工具將你的程序鏈接成為可執行的Exe文件,至此,你的源程序就成了可運行的程序了。運行EXE文件是不用源代碼的,它與編寫程序的語言無關,各種編程語言寫成的源程序經過該編程語言的編譯器可以被編譯成在計算機上可以被運行的執行程序。

㈢ 求用C語言編寫出「胡娟我愛你」的代碼

#include <iostream>
using namespace std;
void main()
{
char ch;
while(true)
{
cout<<"Hi!胡娟嗎?(Y/N)";
cin>>ch;
if (ch == 'Y' || ch == 'y')
{
cout<<"胡娟我愛你!!!"<<endl;
}
}
}

㈣ c語言浪漫代碼

#include <stdio.h>
int main()
{
int i, j, k, l, m;
char c = '*'; //ASCII碼裡面 3 就是一個字元小愛心
for (i = 1; i <= 5; i++)
printf("\n"); //開頭空出5行
for (i = 1; i <= 4; i++)
{ //前3行中間有空隙分開來寫
for (j = 1; j <= 32 - 2 * i; j++)
printf(" "); //左邊的空格,每下一行左邊的空格比上一行少2個 //8*n-2*i
for (k = 1; k <= 4 * i - 2; k++)
printf("%c", c); //輸出左半部分字元小愛心
for (l = 1; l <= 17 - 4 * i; l++)
printf(" "); //中間的空格,每下一行的空格比上一行少4個
for (m = 1; m <= 4 * i - 2; m++)
printf("%c", c); //輸出右半部分字元小愛心
printf("\n"); //每一行輸出完畢換行
}
for (i = 1; i <= 3; i++)
{ //下3行中間沒有空格
for (j = 1; j <= 22 + 1; j++)
printf(" "); //左邊的空格 //8*(n-1)+1
for (k = 1; k <= 31; k++)
printf("%c", c); //輸出字元小愛心
printf("\n"); //每一行輸出完畢換行
}
for (i = 7; i >= 1; i--)
{ //下7行
for (j = 1; j <= 38 - 2 * i; j++)
printf(" "); //左邊的空格,每下一行左邊的空格比上一行少2個//8*(n+1)-2*i
for (k = 1; k <= 4 * i + 1; k++)
printf("%c", c); //每下一行的字元小愛心比上一行少4個(這個循環是i--)
printf("\n"); //每一行輸出完畢換行
}
for (i = 1; i <= 38; i++)
printf(" "); //最後一行左邊的空格
printf("%c", c); //最後一個字元小愛心
for (i = 1; i <= 5; i++)
printf("\n"); //最後空出5行
return 0;
}

㈤ c語言的愛心代碼

愛心代碼編程:

#include <stdio.h>

int main(void)

{

float a,x,y;

for(y=1.5f; y>-1.5f; y-=0.1f)

{

for(x=-1.5f; x<1.5f; x+=0.05f)

{

a = x*x+y*y-1;

char ch = a*a*a-x*x*y*y*y<=0.0f?'*':' ';

putchar(ch);

}

printf(" ");

}


return 0;

}

書寫規則

1、一個說明或一個語句佔一行。

2、用{} 括起來的部分,通常表示了程序的某一層次結構。{}一般與該結構語句的第一個字母對齊,並單獨佔一行。

3、低一層次的語句或說明可比高一層次的語句或說明縮進若干格後書寫。以便看起來更加清晰,增加程序的可讀性。在編程時應力求遵循這些規則,以養成良好的編程風格。

㈥ 求C語言編寫的表白程序,要代碼

呃,你還不如用vbs,網上也有一堆教程和例子,很簡單,隨便看一下就知道怎麼寫了。

DimmyName,herName,myNameAns,herNameAns
myName="池早早"
herName="歐浩辰"
MsgBox(herName+",我喜歡你!我的腦和心,我全身上下每一個器官都在說著我喜歡你。")
do
herNameAns=InputBox("我喜歡誰?","某人的名字")
loopwhileherNameAns<>herName
do
myNameAns=InputBox("誰喜歡"+herName+"?","某人的名字")
loopwhilemyNameAns<>myName
do
myNameAns=InputBox("大聲點我聽不見!","你的名字")
loopwhilemyNameAns<>myName
MsgBox(herName+",這是我為你准備的葯,你趁熱吃吧!")

.........................保存為xxx.vbs文件就能運行了

㈦ 表白代碼大全可復制免費

表白代碼大全可復制免費

表白代碼大全可復制免費,用代碼表白是一件非常浪漫的事情,只需要短短的一行代碼,就可以製作生活中的驚喜和小浪漫,但是設置代碼是需要技巧的,以下分享表白代碼大全可復制免費。

表白代碼大全可復制免費1

1.發送xoxO(會出現滿屏親親)

2.發送mi manchi(會出現滿屏小星星)

3.發送ohh(翻譯:留在我身邊)

4.發送ch will mit dir S wim(翻譯:我想和你在一起)

5.發送Voce e meu bebe(翻譯:你是我的寶貝)

6.發送 RUYDUAautrinuU(翻譯我只喜歡你)

7.發送 love at first sight(翻譯:—見鍾情)

8.發送We will be happy(我們會幸福)

9.發送missu(會出現星星雨)

10.發送u621u7231u460(翻譯:愛你)

11.發送u5728u4e0Ou8d7Nu5427(翻譯在一起)

12.發送Milji pouze jednu osobu, ta osoba jste vy.我只愛一個人,那個人就是你)

13.發送 yax you(翻譯我跟你說)發送yyyax you翻譯我喜歡你)發送 yox you!(我愛死你了)

14.n 55 iw!(倒過來是i miss you我想你。)

15.我想要兩顆西柚("1 wanttoseeyou"我想要見你)

16.962464(用九宮格輸入試試)

17.Mg+Znso4==MgSo4+zn(你的鎂奪走了我的鋅)

18.Te echo de menos(微信翻譯:我想你)

19.雙木非林田下有心(相思)

20.n.nggui(倒過來看就是ineedyoy我需要你)

表白代碼大全可復制免費2

程序員的表白代碼

第一條語言:Java代碼翻譯:直到死之前,每天愛你多一點代碼:while(lifeend){love++;}

第二條語言:C語言代碼翻譯:.代碼:#incldestdio.hintmain(){printf(HelloWorldn);retrn0;}//.

第三條語言:python代碼翻譯:山無陵,江水為竭,冬雷震震,夏雨雪,天地合,乃敢與君絕!代碼:if(mountain.arris==None):if(river.water==None):if(winter.thunder==True):if(summer.snow==

True):if(sky.height==ground.height):i.withyou=Falseelse:i.withyou=True.

第四條語言:Erlang代碼代碼翻譯:深圳相遇,至死不渝代碼:-mole(you_and_me).-export([start/1]).-record(person,{name,address,status}).start(Name)-one_world(Name).one_world(Name)keep_to_love_you(Person).say_goodbye(Person)-io:format(~p:seeyounextworld!~n,[Person#person.name]).see_you_next_world(Name)-one_world(Name).

第五條語言:Java語言代碼翻譯:愛你到天荒地老代碼:while(!world.destroy){System.out.println(iloveyou);}

表白代碼大全可復制免費3

第一條

語言:Java

代碼翻譯:

直到死之前,每天愛你多一點

代碼:

while (life < end) {

love++;

}

// I can not say Hello to the World without u.

第二條

語言:python

代碼翻譯:

山無陵, 江水為竭, 冬雷震震, 夏雨雪, 天地合, 乃敢與君絕!

代碼:

if(mountain.arris==None):

if(river.water==None):

if(winter.thunder==True):

if(summer.snow==True):

if(sky.height==ground.height):

i.withyou=False

else:

i.withyou=True

one_world(Name).

第三條

語言:Java語言

代碼翻譯:

愛你到天荒地老

代碼:

while(!world.destroy){

System.out.println("i love you");

}

第四

語言:C語言

代碼翻譯:

兩隔的`世界;

無名的信件;

短暫的停留;

長久的記憶;

說這么多,只是想說:我想你了。

代碼:

#include

int main()

{

double world;

unsigned letter;

short stay;

long memories;

printf("I miss you. ");

return 0;

}

㈧ c語言 心形圖案代碼

#include<stdio.h>
intmain(){
for(floaty=1.5f;y>-1.5f;y-=0.1f){
for(floatx=-1.5f;x<1.5f;x+=0.05f){
floata=x*x+y*y-1;
putchar(a*a*a-x*x*y*y*y<=0.0f?'*':'');
}
putchar(' ');
}
}

㈨ 祝福他人結婚紀念日快樂用什麼代碼

1 網頁簡介:基於 HTML+CSS+JavaScript 製作七夕情人節表白網頁、生日祝福、七夕告白、 求婚、浪漫愛情3D相冊、炫酷代碼 ,快來製作一款高端的表白網頁送(他/她)浪漫的告白,製作修改簡單,可自行更換背景音樂,文字和圖片即可使用

2.網頁編輯:任意HTML編輯軟體(如:Dreamweaver、HBuilder、Vscode 、Sublime 、Webstorm、Text 、Notepad++ 等任意html編輯軟體進行運行及修改編輯等操作)。

一、網頁效果
二、代碼展示
1.HTML代碼
代碼如下(示例):以下僅展示部分代碼供參考~

<!--
* @Author: your name
* @Date: 2021-04-09 15:18:51
* @LastEditTime: 2021-04-09 16:13:21
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \結婚倒計時\index.html
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>結婚倒計時</title>

<link rel="stylesheet" href="css/styles.css" />
</head>

<body>
<div class="banner-container">
<div class="heading">
<h2>小柳 & 小馮</h2>
<h3>我們要結婚了</h3>
<h5>2021年05月20日</h5>
</div>
<div class="countdown styled"></div>
<div class="rights">版權所有 &; 2021.保留所有權利</div>
</div>

<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="js/jquery.countdown.js"></script>
<script type="text/javascript" src="js/custom.js"></script>
</body>
</html>

2.CSS代碼

* {
margin: 0;
padding: 0;
list-style-type: none;
}
a,
img {
border: 0;
}

p {
color: #24298f;
margin: 0 0 1em !important;
font-size: 13px;
}
body {
font-family: "Open Sans", Arial, sans-serif;
font-size: 14px;
font-weight: 300;
line-height: 1.6em;
color: #656565;
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: 100%;
background: #fff;
transition: all 0.3s linear;
-webkit-transition: all 0.3s linear;
-moz-transition: all 0.3s linear;
-o-transition: all 0.3s linear;
}

.banner-container {
background-image: url("../images/bg.jpg");
background-repeat: repeat;
background-size: cover;
font-size: 14px;
height: 100%;
width: 100%;
overflow: hidden;
position: fixed;
text-shadow: 1px 1px rgba(0, 0, 0, 0.3);
}

.heading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);

text-align: center;
/* margin-top:250px; */
line-height: 60px;
color: #ffffff;
}
.heading h2 {
font-size: 60px;
font-weight: normal;
font-weight: 700;
height: 140px;
line-height: 80px;
}
.heading h3 {
font-size: 28px;
font-weight: 700;
text-shadow: -1px -1px 5px rgba(0, 0, 0, 0.33);
}
.heading h5 {
font-size: 14px;
}

.countdown {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
margin-top: 210px;
line-height: 48px;
}

.styled div span {
display: block;
font-size: 16px;
margin-top: 0;
font-weight: normal;
text-align: center;
background: rgba(255, 255, 255, 0.06);
color: #fff;
margin: 0 9px 8px 9px;
height: 28px;
line-height: 28px;
}

.styled div {
display: inline-block;
margin-left: 10px;
font-size: 30px;
font-weight: normal;
text-align: center;
height: 100px;
text-shadow: none;
vertical-align: middle;
color: #f44336;
margin: 10px 4px;
height: auto;
width: 112px;
border: 1px dashed rgba(255, 255, 255, 0.46);
}

.rights {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
margin-top: 310px;
font-size: 14px;
color: #f44336;
text-align: center;
opacity: 0.6;
}

登錄後復制

三、精彩專欄
看到這里了就 【點贊,關注,收藏】 三連 支持下吧,你的支持是我創作的動力。

㈩ 用c語言設定一個紀念日時間,輸入一個日期,顯示當天距離紀念日的天數。。大佬們求幫忙,小弟明天有急用

#include<stdio.h>
#include<math.h>
#defineYear2018
#defineMonth1
#defineDay8//紀念日時期,可自行更改

intyear_alldays(intyear);
intyear_sumday(intyear,intmonth);
intget_alldays(intyear,intmonth,intday);

intmain()
{
intyear,month,day;
printf("紀念日日期為:%d-%02d-%02d ",Year,Month,Day);

printf("輸入一個日期(如2017-03-21):");
scanf("%d-%d-%d",&year,&month,&day);

intday1=get_alldays(year,month,day);
intday2=get_alldays(Year,Month,Day);

printf("距離紀念日天數為:%d ",abs(day1-day2));
return0;
}

//獲取公歷年的天數
intyear_alldays(intyear)
{
if((year%4==0&&year%100!=0)||year%400==0)return366;elsereturn365;
}

//獲取公歷年初至某整月的天數
intyear_sumday(intyear,intmonth)
{
intsum=0;
intrui[12]={31,29,31,30,31,30,31,31,30,31,30,31};
intping[12]={31,28,31,30,31,30,31,31,30,31,30,31};
intruiflag=0;
if((year%4==0&&year%100!=0)||year%400==0)ruiflag=1;
for(intindex=0;index<month-1;index++)
{
if(ruiflag==1)sum+=rui[index];elsesum+=ping[index];
}
returnsum;
}

//獲取從公歷1800年1月25日至當前日期的總天數
intget_alldays(intyear,intmonth,intday)
{
inti=1800,days=-24;
while(i<year)
{
days+=year_alldays(i);
i++;
}
intdays2=year_sumday(year,month);
returndays+days2+day;
}