recording-2023-09-14-09-17-36
#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <windows.h>
#include <string.h>
int main()
{
int a = 12345678;
int b;
int i;
int h = 0;
for (i = 1; i < 4; i++)
{
printf("请输入密码:");
scanf("%d", &b);
system("cls");
if (b == a)
{
printf("密码正确\n");
Sleep(500);
printf("进入程序中。。\n");
Sleep(500);
system("cls");
h++;
break;
}
else
{
if (i != 3)
{
printf("密码错误请重试\n");
}
else
{
;
}
}
}
if (i == 4)
{
printf("错误次数过多程序已关闭\n");
}
Sleep(1500);
if (h == 1)
{
char a1[] = "hellow!";
char a2[] = " ";
int i = 0;
int k = strlen(a2) - 1;
for (; i <= k; i++, k--)
{
a2[i] = a1[i];
a2[k] = a1[k];
printf("%s\n", a2);
Sleep(500);
system("cls");
}
char a3[] = "what's you name?";
char a4[] = " ";
int c = 0;
int v = strlen(a4) - 1;
for (; c <= v; c++, v--)
{
a4[c] = a3[c];
a4[v] = a3[v];
printf("%s\n", a4);
Sleep(250);
system("cls");
}
printf("what's you name?\n");
}
return 0;
}