Commit 781257d9 by chazog

Upload New File

parent 1f45263b
Showing with 47 additions and 0 deletions
#include <stdio.h>
#include <string.h>
#define rows 6
#define columns 4
int main()
{
int i;
char username[100];
char pass[100];
char name[rows][100];
char password[rows][100];
char status[rows][100];
float money[rows];
for (i = 0; i < rows; i++)
{
scanf("%s %s %s %f", name[i], password[i], status[i], &money[i]);
}
do
{
printf("Enter username");
scanf("%s", username);
for (i = 0; i < 6; i++)
{
if (strcmp(username, name[i]) == 0)
{
do
{
scanf("%s", pass);
if (strcmp(pass, password[i]) == 0)
{
printf("%s %.2f", status[i], money[i]);
return 0;
}
} while (strcmp(pass, password[i]) != 0);
if (strcmp(pass, password[i]) != 0)
{
printf("Input correct password");
}
}
}
} while (strcmp(username, name[i]) != 0);
printf("Input correct username");
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment