Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- struct User
- {
- char username[20];
- char password[20];
- };
- struct CreditCard
- {
- float status;
- char cardNumber[20];
- int cardCVC;
- };
- int main()
- {
- int loggedIn = 0;
- struct User loggedUser;
- while (!loggedIn)
- {
- FILE *fileP;
- char buffer[255];
- char username[20];
- fileP = fopen("korisnik.txt", "r");
- fscanf(fileP, "%s", username);
- char pass[20];
- fscanf(fileP, "%s", pass);
- printf("Enter username:\n");
- char userName[20];
- gets_s(userName, 20);
- printf("Enter password:\n");
- char password[20];
- gets_s(password, 20);
- if (strcmp(username, userName) == 0 && strcmp(pass, password) == 0)
- {
- loggedIn = 1;
- }
- }
- printf("Dobrodosli u <<IME BANKE>>\n");
- printf("---------------------------------------");
- int exitCode = 0;
- while (!exitCode)
- {
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement