① 有哪些代碼是讓你覺得非常浪漫的

hello world

② 誰給我寫一個c語言表白代碼。謝謝

樓主
我都幫你弄成功抄了,也不上來給我最佳答案啊。。。
C++代碼,純粹是湊圖形的
呵呵
#include<iostream>
using
namespace
std;
#include<iostream>
using
namespace
std;
int
main()
{
cout<<
算了,度娘越來越垃。圾。了。連代碼都不給發,你網路M我,我直接代碼貼給你。。

③ 用C語言編寫一個浪漫軟體

#include<iostream>
using namespace std;
void prinstar(void)
{
cout<<" 愛愛愛愛愛愛愛愛愛愛愛愛愛"<<endl;
cout<<" 愛"<<endl;
cout<<" 愛 "<<endl;
cout<<" 愛"<<endl;
cout<<" 愛"<<endl;
cout<<" 愛"<<endl;
cout<<" 愛"<<endl;
cout<<" 愛"<<endl;
cout<<" 愛愛愛愛愛愛愛愛愛愛愛愛愛愛愛愛愛愛愛"<<endl;
}
void print_message(void)
{ cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<"愛 愛 愛 愛 愛愛愛愛愛愛"<<endl;
cout<<"愛 愛 愛 愛 愛 愛"<<endl;
cout<<"愛 愛 愛 愛 愛 愛"<<endl;
cout<<"愛 愛 愛 愛 愛 愛"<<endl;
cout<<"愛 愛 愛 愛 愛 愛愛愛愛愛愛"<<endl;
cout<<"愛 愛 愛 愛 愛 愛 "<<endl;
cout<<"愛 愛 愛 愛 愛 愛"<<endl;
cout<<"愛 愛 愛 愛 愛 愛"<<endl;
cout<<"愛愛愛愛愛 愛 愛 愛愛愛愛愛愛"<<endl;
}
void message(void)
{ cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" "<<endl;
cout<<" 愛 愛 愛 愛 愛"<<endl;
cout<<" 愛 愛 愛 愛 愛 愛 "<<endl;
cout<<" 愛 愛 愛 愛 愛 愛 "<<endl;
cout<<" 愛 愛 愛 愛 愛 愛 "<<endl;
cout<<" 愛 愛 愛 愛 愛 愛"<<endl;
cout<<" 愛 愛 愛 愛 愛 "<<endl;
cout<<" 愛 愛 愛 愛 愛愛"<<endl;
cout<<" 愛 愛 愛 愛 愛 愛"<<endl;
cout<<" 愛 愛 愛 愛 愛 愛"<<endl;
cout<<" 愛 愛 愛"<<endl;
}
int main(void)
{
prinstar();
print_message();
message();
return 0;
}

好像有好多運行不了,我也不知道怎麼回事,畢業好多年了,現在連C語言是啥都不知道了,哎,歲月是吧殺豬刀啊

④ c語言放煙花代碼

#include "stdlib.h"

#include "graphics.h"

#include "stdio.h"

#include "math.h"

#include "conio.h "

#define PI 3.1425926

main()

{

int gdriver=DETECT,gmode,errorcode;

int a[10],b[10],x,y,c,r,i,j,t;

double rad = 0.0;

/* initialize graphics and local variables */

initgraph(&gdriver , &gmode ,"");

/* read result of initialization */

errorcode = graphresult();

if (errorcode != grOk) /* an error occurred */

{

printf("Graphics error : %s/n",grapherrormsg(errorcode));

printf("Please any key to halt:");

getch();

exit(1); /* terminate with an error code */

}

randomize();

for(;!kbhit();)

{

x=rand()%500+100; /*隨機中心坐標*/

y=rand()%300+100;

for(r = 0 ;r <= 8 ; r++ ) /*煙花的大小設定*/

{

for(i = 0,rad = 0.0 ; rad < 2*PI; rad += 0.78 ) /*設定坐標*/

{

a[i++] = x + (int)r *10* cos(rad);

b[ i ] = y + (int)r *10* sin(rad);

}

t = i;

for(i=1;i<t;i++)

{

c=rand()%13+1; /*各點的顏色隨機*/

setcolor(c); /*功能:將當前圖形屏幕的當前筆畫顏色置為color.*/

circle(a[i],b[i],1);/* a[i],b[i] 為圓心 1 為半徑 畫圓 */

}

delay(10000);

delay(10000);

cleardevice();

函數名: cleardevice

功 能: 清除圖形屏幕

用 法: void far cleardevice(void);

}

}

getch();

closegraph();

函數名: closegraph

功 能: 關閉圖形系統

用 法: void far closegraph(void);

}

(4)c語言浪漫代碼擴展閱讀

C語言:表白顯示(多彩小心心)

#include <stdio.h>

#include <math.h>

#include <stdlib.h>

#define I 20

#define R 340

#include <string.h>

int main()

{

char answer[10];

printf("遇到你 我才發現 曾經所有的條件 似乎都成了我等你的借口 ");

printf("我對你的感情已經決堤 所以 請允許我,從今往後映入你 明媚的眼 ");

printf("我 想和你 耳鬢廝磨,相濡以沫!");

printf("答應我吧! 輸入yes,你可以看到我的真心 ");

scanf("%s", answer);

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(' ');

}

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();

return 0;

}

⑤ 求一個示愛的小程序 C語言

void a(int aa)

{for(int i=0;i<aa;i++)printf(" ");}

void b()

{printf ("*");}

char c(int cc)

{printf("%c",cc);return 0;}

int main()

{a(6);b();a(3);b();a(5);b();a(3);b();

printf (" ");

a(4);b();a(8);b();a(8);b();

printf (" ");

a(3);b();a(19);b();

printf (" ");

a(3);b();a(4);c(73);a(1);c(76);c(111);c(118);

c(101);a(1);c(89);c(111);c(117);a(5);b();

printf (" ");

a(4);b();a(17);b();

printf (" ");

a(6);b();a(13);b();

printf (" ");

a(8);b();a(9);b();

printf (" ");

a(10);b();a(5);b();

printf (" ");

a(13);b();

printf (" ");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;

}

(6)c語言浪漫代碼擴展閱讀:

書寫規則

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

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

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

網路-c語言

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

#define IdYes 1002
#define IdNo 1003
#define IdStatic 1004
#define IdTimer 1005
#define Width 640
#define Height 480
#define Tick 2000
#include<windows.h>
int x,y;
RECT rdesk;
HINSTANCE hinst;
HWND hyes,hno;
BOOL quit=FALSE;
LRESULT CALLBACK WndProc(HWND hwnd,UINT Message,WPARAM wParam,LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;
RECT rclient;
HBRUSH hbrbkgnd;
static COLORREF c;
static BYTE r,g,b;

switch(Message)
{
case WM_TIMER:
if(IdTimer==LOWORD(wParam))
{
r=(BYTE)(rand()%256);
g=(BYTE)(rand()%256);
b=(BYTE)(rand()%256);
c=RGB(r,g,b);
InvalidateRect(hwnd,NULL,TRUE);
UpdateWindow(hwnd);
}
break;
case WM_PAINT:
hdc=BeginPaint(hwnd,&ps);
hbrbkgnd=CreateSolidBrush(c);
SelectObject(hdc,hbrbkgnd);
GetClientRect(hwnd,&rclient);
FillRect(hdc,&rclient,hbrbkgnd);
DeleteObject(hbrbkgnd);
EndPaint(hwnd,&ps);
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IdYes:
quit=TRUE;
MessageBox(hwnd,TEXT("回答正確,太太太好了!"),TEXT("寶貝"),MB_ICONEXCLAMATION|MB_OK);
SendMessage(hwnd,WM_CLOSE,0,0);
break;
case IdNo:
MessageBox(hwnd,TEXT("回答錯誤哦,我很生氣呢!"),TEXT("寶貝"),MB_ICONEXCLAMATION|MB_OK);
break;
}
break;
case WM_SIZE:
case WM_MOVE:
SetWindowPos(hwnd,HWND_TOPMOST,x,y,Width,Height,SWP_SHOWWINDOW);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
case WM_CLOSE:
if(quit)
{
KillTimer(hwnd,IdTimer);
DestroyWindow(hwnd);
}
break;
case WM_CREATE:
CreateWindow(TEXT("Static"),
TEXT("請回答:做我女朋友好嗎?"),
WS_CHILD|WS_VISIBLE|SS_CENTER,
200,
200,
240,
20,
hwnd,
(HMENU)IdStatic,
hinst,
NULL
);
hyes=CreateWindow(TEXT("Button"),
TEXT("好"),
WS_CHILD|WS_VISIBLE|BS_CENTER,
270,
230,
45,
20,
hwnd,
(HMENU)IdYes,
hinst,
NULL
);
hno=CreateWindow(TEXT("Button"),
TEXT("不好"),
WS_CHILD|WS_VISIBLE|BS_CENTER,
325,
230,
45,
20,
hwnd,
(HMENU)IdNo,
hinst,
NULL
);
SetTimer(hwnd,IdTimer,Tick,NULL);
break;
default:
return DefWindowProc(hwnd,Message,wParam,lParam);
}
return 0;
}
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
{
WNDCLASSEX wc;
HWND hwnd;
MSG msg;
hinst=hInstance;
srand(time(NULL));
memset(&wc,0,sizeof(wc));
wc.cbSize=sizeof(WNDCLASSEX);
wc.lpfnWndProc=WndProc;
wc.hInstance=hInstance;
wc.hCursor=LoadCursor(NULL,IDC_ARROW);
wc.hbrBackground=(HBRUSH)(COLOR_WINDOW+1);
wc.lpszClassName=TEXT("WindowClass");
wc.hIcon=LoadIcon(NULL,IDI_APPLICATION);
wc.hIconSm=LoadIcon(NULL,IDI_APPLICATION);
if(!RegisterClassEx(&wc))
{
MessageBox(NULL,TEXT("窗口注冊失敗!"),TEXT("錯誤"),MB_ICONEXCLAMATION|MB_OK);
return 0;
}
GetWindowRect(GetDesktopWindow(),&rdesk);
x=(rdesk.right-Width)/2;
y=(rdesk.bottom-Height)/2,
hwnd = CreateWindowEx(WS_EX_TOPMOST,
TEXT("WindowClass"),
TEXT("I Love You"),
WS_THICKFRAME|WS_VISIBLE,
x,
y,
Width,
Height,
NULL,NULL,hInstance,NULL);
if(NULL==hwnd)
{
MessageBox(NULL,TEXT("窗口創建失敗!"),TEXT("錯誤!"),MB_ICONEXCLAMATION|MB_OK);
return 0;
}
while(GetMessage(&msg,NULL,0,0)>0)
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}

截圖



⑧ c語言表白程序源代碼

樓主我都幫你弄成功了,也不上來給我最佳答案啊。。。C++代碼,純粹是湊圖形的呵呵#inclu