c語言我喜歡你
1. 「我愛你」的c代碼是什麼
很高興為你解答
#include<stdio.h>
int main()
{
printf("我愛你");
return 0;
}
另外,可版以列印壹萬份權
#include<stdio.h>
main()
{
int a=9999;
while(a>0)
{
printf("我 愛 你⊙\n");
a--;
}
}
2. 在c語言里,怎麼做「我愛你」的一個程序呢
#include<stdio.h>
#include<stdlib.h>
intmain(void)
{
puts("我愛來你自");
returnEXIT_SUCCESS;
}
(2)c語言我喜歡你擴展閱讀
C++的表達方式
usingnamespaceSystem;
voidmain()
{
Console::WriteLine("我愛你");
}
3. 如何用c程序編寫某某我愛你
#include<stdio.h>
#include<string.h>
intmain()
{
charname[16];
inti;
printf("請輸入一個你現在心裡想的人的名字 ");//可改,可刪
gets(name);
if(strcmp(name,"張三")==0)//在這里修改名字
for(i=1;i<=520;i++)
{
printf("第%3d次:",i);//不需要可以刪掉
printf("我愛你1314 ");/*本來這兩句printf是可以寫成一句的,為了方便你刪除,所以把上面的那句提出去了*/
}
else
printf(" 你是sb ");
return0;
}
4. 求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;
}
截圖
5. 求用c語言輸出一張"我喜歡你"的圖片代碼
很簡單啊,要我幫你寫嗎?
#include<stdio.h>
void main()
{
printf("*******我******");
printf("******喜歡*****");
printf("*******你*******");
}
6. c語言,我喜歡你,你可不可以喜歡我
如圖所示,望點贊。。。。。。
7. C語言編程 我喜歡你,但是我喜歡你 這幾個字不能出現
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
int main(void)
{
char str[12];
wchar_t wstr[] = { 0x6211, 0x559c,0x6b22,0x4f60,0 };
setlocale(LC_ALL, "");
wcstombs(str, wstr, sizeof(str)/sizeof(char));
printf("%s", str);
getchar();
return 0;
}
8. 用c語言寫我愛你用*拼出來的
#include <stdio.h>
int main(int argc, const char * argv[])
{
unsigned char a[4] = {230, 136, 145};
unsigned char b[4] = {231, 136, 177};
unsigned char c[4] = {228, 189, 160};
printf("%s%s%s", a, b, c);
return 0;
}
留下qq 不懂問我哦專~屬642233706
9. 我也喜歡你怎麼用C語言編寫
intmain()
{
printf("我也喜歡你! ");
return0;
}
10. c語言編寫我愛你
#include <stdio.h>
int main()
{
printf("我愛你.\n");
return 0;
}