⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.c

📁 C.Game.Programming.For.Dummies.原码
💻 C
字号:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

void main()
{
    char input[20];

    struct login
    {
        char id[9];
        char password[9];
    } user1 = {
        "bclinton",
        "bubba"
        };

    puts("White House Computer");
    printf("Login Mr. President:");
    gets(input);

    if(strcmp(input,user1.id)!=0)
    {
        puts("Incorrect login!");
        exit(0);
    }

    printf("Password:");
    gets(input);

    if(strcmp(input,user1.password)!=0)
    {
        puts("Incorrect password!");
        exit(0);
    }

    puts("Hello, Mr. President!");
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -