学霸系统

初衷是让这个程序能检测游戏进程并关闭进程,但代码敲着敲着。。。嘿嘿嘿,看看代码你就知道怎么了。当然,最简单的方法还是跑一下。

/*************************
 *xueba system           *
 *                 by:ZCB*
 *************************/ 

#include<stdio.h>
#include <windows.h>
#include <stdlib.h>

int main(void)
{
    double a = 0;
    int b = 4;
    int c = 0;
    printf("Please input the public key.");
    printf("\nTips:\n1.The public key is Zhu's QQ number.\n2.Your computer will be turned off if you put wrong key 5 times.\n");
    scanf("%lf",&a);
    if(a != 763798866)
    {
        printf("\nYour public key is wrong.\n");
        while(b >= 1&&a != 763798866)
        {
            printf("\nYou now have %d chances left.",b);
            printf("\nPlease try again.\n");
            fflush(stdin);
            scanf("%lf",&a);
            b--;
        }
    }
        if(b == 0&&a != 763798866)
        {
            printf("Please ask for the correct key.\n");
            printf("Now your computer will be turned off in 60 seconds.\n");
            system("shutdown -s -t 60");
        }
    else
    {
        printf("\nIt's the correct key.");
        printf("\nThe system is activating,please wait a moment...\n");
        do
        {
            printf("%d percent completed.\r",c);
            Sleep(500);
            c++;
        }
        while(c <= 100);
        printf("\nThe system is activated successfully.\n");
        printf("Please wait 5 seconds.\n");
        Sleep(5000);
        printf("You know,only if away from your computer can you concentrate on leaning.\nSo in order to make you become a xueba,I will turn it off.\n");
        printf("O(∩_∩)O\n");
        system("shutdown -s -t 60");
    }
    system("pause");
    return 0;
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值