http://acm.hit.edu.cn/hoj/problem/view?id=3017
#include <stdio.h>
#include <string.h>
int main()
{
char password[33];
while (scanf("%s", &password) != EOF)
{
if (strcmp(password, "wujiawei") == 0)
{
printf("hit\n");
}
else
{
printf("lose\n");
}
}
return 0;
}
本文介绍了一个简单的C语言程序,用于验证用户输入的密码是否为预设的字符串'wujiawei'。如果是,则输出'h it';如果不是,则输出'lose'。程序使用了基本的输入输出函数以及字符串比较函数。
714

被折叠的 条评论
为什么被折叠?



