Last active
December 8, 2019 18:38
-
-
Save Gabutoo/b029b923a3e125647553ba42ccbf757f to your computer and use it in GitHub Desktop.
Structs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<conio.h> | |
#include<stdlib.h> | |
#include<malloc.h> | |
#include<malloc.h> | |
#include<string.h> | |
struct node *start = NULL; | |
struct node *add(struct node*,char name[50],int password, double money); | |
struct client { | |
char name [50]; | |
int password; | |
double money; | |
}; | |
struct node{ | |
struct client *data; | |
struct node *next; | |
}; | |
int main() | |
{ | |
create(start); | |
getch(); | |
return 0; | |
} | |
//IMPLEMENT HERE!!! | |
struct node *add(struct node *client,char name,int password, double money) | |
{ | |
struct node *new_name,*new_money,new_pin, *ptr; | |
char fullName[100]; | |
double balance; | |
int pin,num; | |
printf("\nRegister Pin: "); | |
scanf("%d",&pin); | |
fflush(stdin); | |
printf("\nEnter the Account Name: "); | |
gets(fullName); | |
printf("\nEnter Balance: "); | |
scanf("\n%lf",&balance); | |
new_money = (struct node *) malloc(sizeof(struct node)); | |
new_money->data = balance; | |
new_name = (struct node *)malloc(sizeof(struct node)); | |
new_name->data = fullName; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment