Update main.c

I think this is right.
Merge pull request #6 from srujank1/patch-5

Update main.c