-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.c
More file actions
61 lines (50 loc) · 1.08 KB
/
App.c
File metadata and controls
61 lines (50 loc) · 1.08 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "singlaheader.h"
void login();
void signup();
void resetPass();
int main(void)
{
printf("Welcome to the Singla Authentication in C\n\n");
printf("Select One of the Options from Below :- \n\n");
printf("1. Login\n");
printf("2. Signup\n");
printf("3. Reset Password\n");
printf("4. Exit\n");
int val = 0;
char input[32];
while (val == 0)
{
printf("Enter Your Choice :- ");
if (fgets(input, sizeof(input), stdin) == NULL)
{
break;
}
if (sscanf(input, "%d", &val) != 1)
{
printf("Invalid Choice\n");
continue;
}
if (val == 1)
{
login();
}
else if (val == 2)
{
signup();
}
else if (val == 3)
{
resetPass();
}
else if (val == 4)
{
break;
}
else
{
printf("Invalid Choice\n");
val = 0;
}
}
return 0;
}