Browse Source

implementation of generateID()

remotes/origin/beta
fdai7057 2 years ago
committed by fdai7207
parent
commit
8d9f625709
  1. 11
      src/CreateCustomer.c
  2. 4
      src/CreateCustomer.h

11
src/CreateCustomer.c

@ -0,0 +1,11 @@
#include "CreateCustomer.h"
int generateID()
{
const int MIN = 1000000, MAX = 10000000;
int p_val = rand() % (MAX);
if(p_val<MIN)
{
p_val += MIN;
}
return p_val;
}

4
src/CreateCustomer.h

@ -0,0 +1,4 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int generateID();
Loading…
Cancel
Save