Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(void){
- int quit=1;
- char s;
- char username[20];
- char password[20];
- char type[20];
- char user_2[20];
- char pass_2[20];
- char type_2[20];
- FILE * file;
- while(quit!=-1){
- printf("Please choose from the following options: \n");
- printf("(a)dd\n");
- printf("(d)el\n");
- printf("(e)dit\n");
- printf("(v)erify\n");
- printf("(q)ut\n");
- scanf("%c",&s);
- switch(s){
- case 'a':
- file=fopen("password.csv","rw");
- printf("%s","username: ");
- scanf("%s", username);
- printf("password: ");
- scanf("%s",password);
- printf("type: ");
- scanf("%s",type);
- fprintf(file, "%s %s %s", username, password, type);
- fclose(file);
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement