#include <stdio.h>
#include <stdlib.h>
struct stats {
int account;
float balance;
struct stats *next;
};
void fill_structure(struct stats *s);
struct stats *create(void);
int main()
{
struct stats *first;
struct stats *current;
struct stats *new;
int x=5;
first = create();
current =first;
for(x=0;x<5;x++)
{
if(x==0)
{
first = create();
current = first;
}
else
{
new = create();
current->next =new;
current = new;
}
fill_structure(current);
}
current->next = NULL;
current = first;
while(current)
{
printf("Account %05:\t$%.2f\n",
current->account,
current->balance);
current = current->next;
}
return(0);
}