1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
|
#include <stdio.h>
#include <stdlib.h>
int main() {
int password = 12341234;
char username[10];
char userPassword[10];
printf("Enter username:");
gets(username);
printf("Enter password:");
gets(userPassword);
int inputCode = atoi(userPassword);
if (inputCode == password) {
printf("Logged in.\n");
} else {
printf("Wrong passcode.\n");
}
} |