Create assignment3.c

my version of c implementation