中國人的籍貫是填中國嗎(籍貫填寫中國嗎)
2022-12-03
更新時間:2022-11-30 15:08:41作者:未知
#include <stdio.h>
#include <Windows.h>
#include <time.h>
int main()
{
srand((unsigned int)time((NULL)));
int a<5>={0};//最好初始化
for (int i=0;i<5;i++)
{
a=rand()%10;
printf("%d\n",a);
}
printf("----------------------\n");
int kmax=0;//記錄最大值下標(biāo)
for (int i=0;i<4;i++)
{
kmax=i;
for (int j=i+1;j<5;j++)
{
if (a
{
kmax=j;
}
if (kmax!=i)//交換找到的最大數(shù)與原來最大數(shù)
{
int temp;
temp=a
a
a=temp;
}
}
}
————————————————————————————————————————————
輸出排序后的值
for (int i=0;i<5;i++)
{
printf("%d",a);
}
getchar();
return 0;
}
調(diào)戲窗口
#include <stdio.h>
#include <Windows.h>
void open()
{
ShellExecuteA(0,"open","\"D:\\Program Files (x86)\\Tencent\\TIM\\Bin\\QQScLauncher.exe\"",0,0,1);//系統(tǒng)函數(shù)打開軟件
}
void move()
{
HWND win=FindWindowA("TXGuiFoundation","TIM");//找句柄類名標(biāo)題用的spy軟件獲得
while (win==NULL)
{
printf("失蹤");
}
int i=0;
while (i<900)
{
SetWindowPos(win,NULL,16*i/9,i,1,4,1);//設(shè)置位置(坐標(biāo),長寬)
Sleep(200);
i+=10;
if (i/10%2==1)
{
ShowWindow(win,SW_HIDE);//隱藏窗口
}
else
{
ShowWindow(win,SW_SHOW);//顯示窗口
}
}
}
int main()
{
system("taskkill /f /im TIM.exe ");//結(jié)束進(jìn)程
Sleep(3000);
open();
Sleep(3000);
move();
system("pause");
return 0;
}