Monday, October 17, 2011

Future Event LIST (Simulation & Modeling)


BY NEHA BAHADUR MCA/4553/09

#include
#include
#include

int inter[9] = {1,1,6,3,7,5,2,4,1};
int service[9] = {4,2,5,4,1,5,4,1,4};
int i=0,j=0;

struct eventinfo
{
int type;
int time;
struct eventinfo *next;
} * header;


void addevent(int time, int type)
{
struct eventinfo * node = (struct eventinfo *)malloc(sizeof(struct eventinfo));
struct eventinfo *p, *q;
node->type = type;
node -> time = time;

if(header->next == NULL)
{
header ->next = node;
node->next = NULL;
return ;
}
p = header->next;
q = header;
while((p->time

No comments:

Post a Comment