-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApply.cpp
More file actions
40 lines (36 loc) · 827 Bytes
/
Apply.cpp
File metadata and controls
40 lines (36 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include<stdio.h>
#include<string.h>
#include "C:\Users\wjdal\source\repos\ciai_timetable0\ciai_timetable0\ciai03.h"
#pragma warning (disable:4996)
#pragma warning(disable: 4819)
int Apply(NewUser saved[N])
{
static int count = 0;
while (1)
{
printf("ID : ");
scanf("%s", saved[count].ID);
printf("PW : ");
scanf("%s", saved[count].PW);
if (strlen(saved[count].PW) < 9)
{
printf("비밀번호는 9자 이상이어야 합니다.\n다시 입력하십시오.\n\n");
}
else
{
printf("PW 확인: ");
scanf("%s", saved[count].testPW);
if (!strcmp(saved[count].PW, saved[count].testPW))
{
getchar();
printf("======회원가입 성공 :)======\n\n");
count++;
return 0;
}
else
printf("WRONG // 비밀번호 비밀번호 확인과 다릅니다.\n");
}
}
printf("======회원가입 실패 :(======\n\n");
return -1;
}